1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-04 07:15:32 +02:00
tldr/pages/common/poetry.md
Jakub Boukal 36a2343019
poetry: add install command, update page (#12056)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2024-01-11 13:43:48 +01:00

840 B

poetry

Manage Python packages and dependencies. See also: asdf. More information: https://python-poetry.org/docs/cli/.

  • Create a new Poetry project in the directory with a specific name:

poetry new {{project_name}}

  • Install and add a dependency and its sub-dependencies to the pyproject.toml file in the current directory:

poetry add {{dependency}}

  • Install the project dependencies using the pyproject.toml file in the current directory:

poetry install

  • Interactively initialize the current directory as a new Poetry project:

poetry init

  • Get the latest version of all dependencies and update poetry.lock:

poetry update

  • Execute a command inside the project's virtual environment:

poetry run {{command}}

  • Bump the minor version of the project in pyproject.toml:

poetry version minor