2020-02-03 16:46:41 +00:00
|
|
|
# poetry
|
|
|
|
|
|
|
|
> Manage Python packages and dependencies.
|
|
|
|
> More information: <https://python-poetry.org/docs>.
|
|
|
|
|
|
|
|
- Create a new Poetry project in the directory with a specific name:
|
|
|
|
|
|
|
|
`poetry new {{project_name}}`
|
|
|
|
|
|
|
|
- Install a dependency and its subdependencies:
|
|
|
|
|
|
|
|
`poetry add {{dependency}}`
|
|
|
|
|
2021-11-30 14:12:11 +00:00
|
|
|
- Install a development dependency and its subdependencies:
|
|
|
|
|
|
|
|
`poetry add --dev {{dependency}}`
|
|
|
|
|
2020-02-03 16:46:41 +00:00
|
|
|
- Interactively initialize the current directory as a new Poetry project:
|
|
|
|
|
|
|
|
`poetry init`
|
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- Get the latest version of all dependencies and update `poetry.lock`:
|
2020-02-03 16:46:41 +00:00
|
|
|
|
|
|
|
`poetry update`
|
|
|
|
|
|
|
|
- Execute a command inside the project's virtual environment:
|
|
|
|
|
|
|
|
`poetry run {{command}}`
|