PyPI (Python Package Index)

The Python Package Index, known as PyPI, is the central repository where Python developers publish and discover software packages. Its own help pages describe a PyPI “file”, also called a “package”, as “something that you can download and install”, and explain that “Projects on PyPI are made and shared by other members of the Python community so that you can use them” (https://pypi.org/help/). When a developer types pip install, the named distribution is fetched from PyPI by default.

PyPI organizes software into projects, releases, and files. A project is the named collection, a release is a specific version, and a file is a downloadable artifact in a format such as a wheel or a source distribution. The Python Packaging Authority’s guide notes that PyPI is “the most widely known centralized source for installing Python libraries and tools” (https://packaging.python.org/en/latest/discussions/distribution-package-vs-import-package/).

A point of confusion that PyPI’s own documentation acknowledges is that the name used to install a package can differ from the name used to import it. The packaging guide gives Pillow as an example: it is installed as Pillow but imported as PIL for historical compatibility reasons, and the index “does not enforce any relationship” between the two names (https://packaging.python.org/en/latest/discussions/distribution-package-vs-import-package/).

The service today runs on Warehouse, an open-source application maintained by the Python Packaging Authority, and is heavily cached and distributed via a content delivery network for global availability (https://pypi.org/help/). PyPI has grown into one of the largest software registries of any programming language and is the backbone of the Python installation ecosystem.