Generated by GPT-5-mini| poetry (software) | |
|---|---|
| Name | Poetry |
| Title | Poetry |
| Developer | Python Packaging Authority |
| Released | 2017 |
| Programming language | Python |
| Operating system | Cross-platform |
| License | MIT License |
poetry (software) is a Python dependency manager and packaging tool designed to simplify project setup, dependency resolution, and distribution. It provides a declarative configuration format, a lockfile mechanism, and integrated build and publish commands intended to replace combinations of pip, setuptools, virtualenv, and pipenv in many workflows. Developed to align with modern Python packaging standards and to interoperate with repositories and registries, it targets library authors and application developers working across platforms such as Linux, Windows, and macOS.
Poetry originated in 2017 as a community-driven alternative to traditional Python tooling, emerging alongside initiatives like PEP 517, PEP 518, and the Python Package Index modernization efforts. Early development drew attention from contributors familiar with pip, setuptools, and virtualenv workflows, while discussions occurred in venues frequented by members of the Python Software Foundation and projects such as Django, Flask, and NumPy. Over time, Poetry incorporated practices from ecosystem tools including Conda, Homebrew, and GitHub Actions for CI/CD integration. Major milestones included support for the build-backend specifications that echo decisions made by the Python Packaging Authority and visibility during conferences like PyCon US and EuroPython.
Poetry exposes a declarative project file format and a consistent command-line interface with features like dependency resolution, lockfile generation, and project publishing. Its configuration concentrates metadata in a single file, promoting patterns used by projects such as Pandas, Requests, Scikit-learn, TensorFlow, and PyTorch that rely on reproducible environments. The lockfile mechanism echoes reproducibility goals found in Cargo (software) and npm lockfiles, aiding deterministic installs used by teams at organizations like Mozilla and Red Hat. Integrated publishing workflows accommodate registries including the Python Package Index and private registries used by enterprises like Google and Microsoft. Other features include virtual environment management comparable to virtualenvwrapper and compatibility shims that reference standards adopted by PEP 517 and PEP 621.
The tool is implemented in Python, structured around modular components for parsing, dependency resolution, and backend build orchestration. Its resolver algorithm addresses version constraints in a manner similar to strategies used by Bundler, Cargo (software), and Composer (software), while leveraging lockfile semantics inspired by npm and Yarn to achieve reproducible installs. Poetry’s design separates the declarative project model from backend build operations, enabling backends aligned with PEP 517 and build frontends used by projects like Hatch and Flit. Implementation details reflect interoperability goals with package repositories such as the Python Package Index and continuous integration platforms like Travis CI, GitHub Actions, and GitLab CI.
Typical workflows start with initializing a project that generates a configuration file containing metadata comparable to manifests used by Setuptools-based projects and by tools supporting PEP 621. Users add dependencies with commands that update both the project file and a lockfile, then use install commands to create reproducible environments for development and testing in contexts similar to those used by maintainers of Django REST framework, Celery, and Scrapy. Publishing uses integrated commands to build and upload distributions to registries such as the Python Package Index or private artifact stores employed by enterprises like Netflix and Dropbox. CI pipelines for projects hosted on GitHub or GitLab often incorporate Poetry steps for dependency installation and packaging, paralleling patterns in projects like Home Assistant and Ansible.
Poetry maintains a TOML-based project file and a lockfile that records exact package versions, checksums, and metadata required for deterministic installation. The approach mirrors metadata consolidation trends visible in projects such as Rust crates using Cargo (software), Node.js packages using npm, and RubyGems relying on Bundler. Dependency resolution takes into account Python version markers and extras, helping manage complex constraints found in ecosystems like SciPy and Matplotlib. For private registries and enterprise use, Poetry supports authentication workflows and repository configuration patterns similar to those used by Artifactory and Nexus Repository Manager deployments at organizations like IBM and Cisco.
Poetry’s community includes contributors from open-source projects, maintainers of libraries like Black (software), Isort, and Pytest, and users within companies such as Stripe, Shopify, and Spotify. Documentation, issues, and discussions appear on platforms frequented by developers working with GitHub, GitLab, and issue trackers tied to projects like Flake8 and Mypy. The ecosystem features integrations and adapters for CI/CD systems including Jenkins and Travis CI, packaging frontends like Hatch, and compatibility layers supporting popular libraries and frameworks including FastAPI and SQLAlchemy. Community governance leverages practices common to other Python projects endorsed by the Python Software Foundation and showcased during events such as PyCon US.
Category:Python (programming language) tools