Get the App
SLTechnology News&Howtos  ›  Development  › 

How does python poetry create a project

Shulou Source: shulou.com Published: 2022-06-03 17:41:28 10月25日 Update

This article mainly shows you "how python poetry creates projects", the content is simple and easy to understand, the organization is clear, I hope to help you solve doubts, let Xiaobian lead you to study and learn "how python poetry creates projects" this article bar.

1. You can create a project scaffold by commanding poetrynew.

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

Poetry creates the example project, generates the corresponding folder and pyproject.toml, including project information.

In an existing project, initialize with the command poetryinit.

➜ example poetry init This command will guide you through creating your pyproject.toml config.# Interactive bash, through which project information is filled in. Package name [example]: exampleVersion [0.1.0]: 0.0.8Description []: example projectAuthor [so1n , n to skip]: nLicense []: Compatible Python versions [^3.7]: Would you like to define your main dependencies interactively? (yes/no) [yes] noWould you like to define your development dependencies interactively? (yes/no) [yes] noGenerated file#After filling in the project information, the following content will be generated, and then the pyproject.toml file will be created in the path just now and written. [tool.poetry]name = "example"version = "0.0.8"description = "example project"authors = ["Your Name "] [tool.poetry.dependencies]python = "^3.7" [tool.poetry.dev-dependencies] [build-system]requires = ["poetry-core>=1.0.0"]build-backend = "poetry.core.masonry.api" Do you confirm generation? (yes/no) [yes] yes The above is "Python poetics how to create a project" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Tags: Projects content information articles commands documents learning help generation can be done through hands and feet folders easy to understand more organization knowledge editing industry information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology Xiaomi Linux OPPO Reno