Set up a Python project with consistent dependencies across your team and production environments using a single lock file.
Build and publish a Python library to PyPI without learning separate packaging tools.
Organize development, testing, and documentation dependencies into separate groups within one configuration file.
Isolate project dependencies in virtual environments so different projects don't conflict with each other.
Poetry is a tool for managing Python project dependencies and packaging. The problem it solves is that Python's historical tooling for these tasks, spread across setup.py, requirements.txt, setup.cfg, MANIFEST.in, and Pipfile, is fragmented, inconsistent, and difficult to work with reliably. Poetry consolidates all of that into a single pyproject.toml file (a standardized project configuration format) and a unified command-line interface. With Poetry you declare what your project needs in pyproject.toml: which Python version it requires, which libraries it depends on, and optional groups of dependencies used only for development, documentation, or testing. Poetry then resolves all of those dependencies, including their transitive dependencies (what your dependencies depend on), to a consistent set of versions that work together, and records the exact resolved versions in a lock file called poetry.lock. This lock file ensures that every developer on a team and every deployment environment installs exactly the same versions, eliminating the common problem where code works on one machine but not another due to version differences. Poetry also handles building and publishing Python packages to PyPI (the Python Package Index), the central repository where Python libraries are distributed. Commands like poetry build and poetry publish handle the packaging and upload steps that previously required separate tools. Additional useful features include virtual environment management (Poetry automatically creates isolated environments per project so dependencies don't conflict between projects), dependency groups for organizing dev and optional extras, and support for installing packages directly from Git repositories. You would use Poetry on any Python project where you want clean, reproducible dependency management and packaging. It is itself a Python tool, installable via a standalone installer script, and is widely used in both open-source libraries and production applications.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.