Skip to content

Poetry

A tool for managing Python project dependencies and packaging them, using one pyproject.toml file.

Stars
34.3k
Forks
2.6k
Licence
MIT
Language
Python
Last update
6 days ago
Type
Dev tool

What it is

Poetry helps Python developers declare the libraries their project needs, lock exact versions, and install them consistently on other machines. It replaces several older project files such as setup.py, requirements.txt and Pipfile with a single pyproject.toml file. It can also build and publish Python packages.

  • Declare project dependencies in pyproject.toml and install them with poetry install
  • Organize development, documentation and lint dependencies into separate groups and install only the ones you need
  • Define a command-line script for your package through [project.scripts]
  • Declare optional extras and install them with an extra flag

Great for

  • Python developers starting a new project who want one config file for dependencies and packaging
  • Teams that need the same dependency versions installed on every machine and in CI
  • Maintainers of Python libraries who want to build packages from pyproject.toml
  • Developers who want optional dependency groups such as dev, docs or lint

Not ideal for

  • People who only need to run a single script and do not manage dependencies, since setup is more than they need
  • Projects that must stay on the older setup.py or requirements.txt workflow, because migrating takes effort
  • Non-Python projects, since the tool is specific to the Python ecosystem
Step-by-step guide: how to use PoetryInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    See the README

    You'll need: Python (the README's example requires-python is >=3.9, but the Poetry version's own requirement is not stated in the README excerpt)

    Install Poetry using the official script

    curl -sSL https://install.python-poetry.org | python3 -
  2. 2

    Run it

    • Follow the installation documentation at python-poetry.org to install Poetry
    • Create or open a project that has a pyproject.toml file
    • Run poetry install to install the declared dependencies
    • Use the optional group flag such as poetry install --with docs to include optional groups
  3. 3

    Get the most out of it

    • Use dependency groups such as dev, docs and lint to keep optional tools separate from runtime dependencies
    • Add optional extras under [project.optional-dependencies] and install them with -E
    • Use the related poetry-plugin-export plugin to export lock files to requirements.txt format
    • Use poetry-plugin-bundle to install projects into external formats such as virtual environments

Downloads

Strengths

  • Uses the standard pyproject.toml format, replacing several older project files
  • Supports dependency groups and optional extras for organizing requirements
  • Released under the permissive MIT license and actively maintained, with a large user base

Trade-offs

  • The README is truncated here, so detailed command behavior and edge cases are not covered in this summary
  • Adds a separate tool to learn and install alongside Python itself
  • Some configuration uses Poetry-specific [tool.poetry] syntax alongside the standard [project] table, which can be confusing

How it compares

ProjectStarsTypeLevelUpdatedBest for
poetry (this)34.3kDev toolintermediate6 days agoPython developers starting a new project who want one config file for dependencies and packaging
pipenv25kDev toolbeginner5 days agoPython application developers who want one command set for environments and dependencies
composer29.6kDev toolbeginner4 days agoPHP developers starting a new project who want standard third-party libraries
rye14.1kDev toolbeginner9 months agoDevelopers who already run Rye and need a reference for its existing workflow
pnpm37kDev toolbeginner4 days agoDevelopers working in Node.js projects who want faster installs and less disk use
patch-package11.2kDev toolbeginner1.1 years agoTeams running a Node.js app who need a quick fix to a dependency before the upstream project publishes one

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.