Project Summaries - Python Packaging User Guide
Skip to content Back to top View this page Edit this page Project Summaries ¶ Summaries and links for the most relevant projects in the space of Python installation and packaging. PyPA Projects ¶ bandersnatch ¶ Docs | Issues | GitHub | PyPI bandersnatch is a PyPI mirroring client designed to efficiently create a complete mirror of the contents of PyPI. Organizations thus save bandwidth and latency on package downloads (especially in the context of automated tests) and to prevent heavily loading PyPI’s Content Delivery Network (CDN).
Files can be served from a local directory or AWS S3 . build ¶ Docs | Issues | GitHub | PyPI build is a PEP 517 compatible Python package builder. It provides a CLI to build packages, as well as a Python API. cibuildwheel ¶ Docs | Issues | GitHub | PyPI | Discussions | Discord #cibuildwheel cibuildwheel is a Python package that builds wheels for all common platforms and Python versions on most CI systems. Also see multibuild . distlib ¶ Docs | Issues | GitHub | PyPI distlib is a library which implements low-level functions that relate to packaging and distribution of Python software. distlib implements several relevant PEPs (Python Enhancement Proposal standards) and is useful for developers of third-party packaging tools to make and upload built and source distributions , achieve interoperability, resolve dependencies, manage package resources, and do other similar functions.
Unlike the stricter packaging project (below), which specifically implements modern Python packaging interoperability standards, distlib also attempts to provide reasonable fallback behaviours when asked to handle legacy packages and metadata that predate the modern interoperability standards and fall into the subset of packages that are incompatible with those standards. distutils ¶ The original Python packaging system, added to the standard library in Python 2.0 and removed in 3.12.
Due to the challenges of maintaining a packaging system where feature updates are tightly coupled to language runtime updates, direct usage of distutils has been actively discouraged, with Setuptools being the preferred replacement. Setuptools not only provides features that plain distutils doesn’t offer (such as dependency declarations and entry point declarations), it also provides a consistent build interface and feature set across all supported Python versions.
Consequently, distutils was deprecated in Python 3.10 by PEP 632 and has been removed from the standard library in Python 3.12. Setuptools bundles the standalone copy of distutils, and it is injected even on Python < 3.12 if you import setuptools first or use pip. flit ¶ Docs | Issues | PyPI Flit provides a simple way to create and upload pure Python packages and modules to PyPI. It focuses on making the easy things easy for packaging.
Flit can generate a configuration file to quickly set up a simple project, build source distributions and wheels, and upload them to PyPI. Flit uses pyproject.toml to configure a project. Flit does not rely on tools such as Setuptools to build distributions, or twine to upload them to PyPI. Flit requires Python 3, but you can use it to distribute modules for Python 2, so long as they can be imported on Python 3. The flit package is lifted by Matthias Bussonnier since October 2023 on the tidelift platform , and funds sent to the PSF and earmarked for PyPA usage. hatch ¶ Docs | GitHub | PyPI Hatch is a unified command-line tool meant to conveniently manage dependencies and environment isolation for Python developers.
Python package developers use Hatch and its build backend Hatchling to configure, version, specify dependencies for, and publish packages to PyPI. Its plugin system allows for easily extending functionality. packaging ¶ Docs | Issues | GitHub | PyPI Core utilities for Python packaging used by pip and Setuptools . The core utilities in the packaging library handle version handling, specifiers, markers, requirements, tags, and similar attributes and tasks for Python packages.
Most Python users rely on this library without needing to explicitly call it; developers of the other Python packaging, distribution, and installation tools listed here often use its functionality to parse, discover, and otherwise handle dependency attributes. This project specifically focuses on implementing the modern Python packaging interoperability standards defined at Python Packaging Specifications , and will report errors for sufficiently old legacy packages that are incompatible with those standards.
In contrast, the distlib project is a more permissive library that attempts to provide a plausible reading of ambiguous metadata in cases where packaging will instead report on error. pip ¶ Docs | Issues | GitHub | PyPI The most popular tool for installing Python packages, and the one included with modern versions of Python. It provides the essential core features for finding, downloading, and installing packages from PyPI and other Python package indexes, and can be incorporated into a wide range of development workflows via its command-line interface (CLI).
Pipenv ¶ Docs | Source | Issues | PyPI Pipenv is a project that aims to bring the best of all packaging worlds to the Python world. It harnesses Pipfile , pip , and virtualenv into one single toolchain. It can autoimport requirements.txt and also check for CVEs in Pipfile using safety . Pipenv aims to help users manage environments, dependencies, and imported packages on the command line. It also works well on Windows (which other tools often underserve), makes and checks file hashes, to ensure compliance with hash-locked dependency specifiers, and eases uninstallation of packages and dependencies. pipx ¶ Docs | GitHub | PyPI pipx is a tool to install and run Python command-line applications without causing dependency conflicts with other packages installed on the system.
Python Packaging User Guide ¶ Docs | Issues | GitHub This guide! readme_renderer ¶ GitHub and docs | PyPI readme_renderer is a library that package developers use to render their user documentation (README) files into HTML from markup languages such as Markdown or reStructuredText. Developers call it on its own or via twine , as part of their release management process, to check that their package descriptions will properly display on PyPI.
Setuptools ¶ Docs | Issues | GitHub | PyPI Setuptools is a collection of enhancements to the Python distutils that allow you to more easily build and distribute Python distributions , especially ones that have dependencies on other packages. trove-classifiers ¶ Issues | GitHub | PyPI trove-classifiers is the canonical source for classifiers on PyPI , which project maintainers use to systematically describe their projects so that users can better find projects that match their needs on the PyPI.
The trove-classifiers package contains a list of valid classifiers and deprecated classifiers (which are paired with the classifiers that replace them). Use this package to validate classifiers used in packages intended for uploading to PyPI. As this list of classifiers is published as code, you can install and import it, giving you a more convenient workflow compared to referring to the list published on PyPI . The issue tracker for the project hosts discussions on proposed classifiers and requests for new classifiers. twine ¶ Docs | Issues | GitHub | PyPI Twine is the primary tool developers use to upload packages to the Python Package Index or other Python package indexes.
It is a command-line program that passes program files and metadata to a web API. Developers use it because it’s the official PyPI upload tool, it’s fast and secure, it’s maintained, and it reliably works. virtualenv ¶ Docs | Issues | GitHub | PyPI virtualenv is a tool for creating isolated Python Virtual Environments , like venv . Unlike venv , virtualenv can create virtual environments for other versions of Python, which it locates using
The rest of this page is on the live site.