首页IT科技Python创建字典(python poetry如何创建项目)

Python创建字典(python poetry如何创建项目)

时间2025-07-29 05:51:46分类IT科技浏览3888
导读:1、可以通过命令poetrynew创建项目手脚架。 ➜poetrynewexample ➜tree . └──example ├──example │└──...

1            、可以通过命令poetrynew创建项目手脚架              。

➜poetrynewexample ➜tree . └──example ├──example │└──__init__.py ├──pyproject.toml ├──README.rst └──tests ├──__init__.py └──test_example.py 3directories,5files

2                    、Poetry创建了example项目              ,生成了相应的文件夹和pyproject.toml                  ,包括项目信息                  。

在现有项目中      ,通过命令poetryinit进行初始化      。

➜examplepoetryinit Thiscommandwillguideyouthroughcreatingyourpyproject.tomlconfig. #交互bash           ,通过该交互bash填写项目信息           。 Packagename[example]:example Version[0.1.0]:0.0.8 Description[]:exampleproject Author[so1n<qaz6803609@163.com>,ntoskip]:n License[]: CompatiblePythonversions[^3.7]: Wouldyouliketodefineyourmaindependenciesinteractively?(yes/no)[yes]no Wouldyouliketodefineyourdevelopmentdependenciesinteractively?(yes/no)[yes]no Generatedfile #填写完项目信息后会生成以下内容                  ,之后会在刚才的路径创建pyproject.toml文件         ,并写入                  。 [tool.poetry] name="example" version="0.0.8" description="exampleproject" authors=["YourName<you@example.com>"] [tool.poetry.dependencies] python="^3.7" [tool.poetry.dev-dependencies] [build-system] requires=["poetry-core>=1.0.0"] build-backend="poetry.core.masonry.api" Doyouconfirmgeneration?(yes/no)[yes]yes

以上就是python poetry创建项目的方法        ,希望对大家有所帮助         。更多Python学习指路:Python基础教程

创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

展开全文READ MORE
python求方差和标准差(python方差检验是什么意思) python编写网页(python如何制作探针模块)