Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

python-poetry/poetry

Developer Tools

Declare, resolve, lock and install Python project dependencies and build packages from a single pyproject.toml.

34,405
2,581
Python
MIT
8 years old

What it does

Poetry manages Python project dependencies and packaging. Instead of spreading configuration across setup.py, requirements.txt, setup.cfg, MANIFEST.in and Pipfile, a project keeps its metadata and dependencies in one pyproject.toml. Poetry resolves the dependency graph, writes a lock file, installs a reproducible environment, and builds or publishes distributions. It targets Python application and library maintainers who want dependency resolution and package metadata in one tool.

The README shows a PEP 621-style [project] section and Poetry-specific extensions: dependency groups for dev, docs and lint tools, optional groups, optional dependencies, and direct git references such as cleo @ git+https://github.com/python-poetry/cleo.git@main project example.

Getting started

Poetry ships an official installer at install.python-poetry.org; the README points there for the basic script and to the installation docs for advanced script options, alternative installers and CI usage installation notes.

A typical first project:

poetry new my-package
cd my-package
poetry add requests
poetry install

After that, poetry add updates pyproject.toml and the lock file, and poetry install creates or syncs the environment. The exact installer flags and platform-specific steps are in the installation documentation. The documentation covers command reference, dependency specification and publishing.

The example pyproject.toml also demonstrates how to declare console scripts with [project.scripts] and optional extras with [project.optional-dependencies], which are installed with poetry install -E <extra>.

Constraints

The sample build-system requirement is poetry-core>=2.0.0,<3.0.0, and the project metadata uses standard [project] fields. Poetry also understands its own [tool.poetry] keys, and the two styles have to be kept consistent. Dependency groups can be marked optional and only installed when explicitly requested, e.g. poetry install --with docs. Projects that need to export to requirements.txt should use the separate poetry-plugin-export rather than expecting it in core related projects.

The project is MIT-licensed and written in Python, with its own version pins determining compatible Python versions. The README does not state every runtime or CI requirement; consult the installation docs for supported environments.

HotRepo's take

Poetry has long been a reference point in Python dependency management: a 2019 v1.0 thread drew hundreds of comments, and a 2023 discussion still compared it with pip-tools and other options 2023 discussion. In that thread, one commenter said Poetry had been flaky up to about v1.2.x but "since v1.5.x it's been superb" comment, while another preferred pip-tools because it works with a standard venv and avoids installing Poetry in every dev and production environment comment; a reply noted Poetry can export a requirements.txt for Docker images instead reply. These are individual experiences, not measured results. The repository's recorded snapshot on 2026-11-06 shows 129 stars gained that day on the Python daily list at position 6, and the project then had about 34k stars.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

Hacker News

Poetry – Dependency Management for Python – v1.0
▲ 129 · 73 comments · December 13, 2019
Poetry v1.0
▲ 73 · 1 comment · December 13, 2019
Poetry: Python dependency management and packaging made easy
▲ 56 · 2 comments · December 13, 2019