Manage Python Projects With Poetry
Declare dependencies in pyproject.toml and lock them reproducibly.
Run poetry init to create a pyproject.toml, then poetry add requests to add a dependency.
01Command
Command
$ poetry init02What it does
Poetry reads pyproject.toml, resolves dependencies into a poetry.lock file and manages a project virtualenv. It can build and publish packages and runs scripts through poetry run, giving one tool for dependencies and packaging.
03Risk
!Warning: Mixing Poetry with manually edited requirement files or a second resolver can produce inconsistent environments.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Homebrew formula: poetryEvidence: Python package management tool. Packages Poetry, a Python dependency management and packaging tool.
Last verified: 2026-09-22 · Category: Developer