PyPI
acronymKept in this browser · My desk
Stands for: Python Package Index
Python Package Index: the default package index for the Python community, at pypi.org, where any Python developer can publish distributions and from which pip installs.
The Packaging User Guide records that the pypi.org domain replaced the legacy pypi.python.org in 2017. pip installs from it unless pointed at another index. Because it is open to all developers and, in its own documentation's words, does not pre-screen or review projects before they are published, a project's name alone says nothing about who published a file or what the file does; pinning versions and hashes is how a deployment fixes exactly what it installs.
PyPI (Python Package Index), pronounced pie-pea-eye so that it is not confused with the PyPy interpreter, describes itself as a repository of software for the Python programming language and is the default source for pip, PDM, Poetry and uv. Its content has three levels: a project is a named collection of releases, a release is one version of the project, and a release consists of one or more files, each a source archive or a wheel built for some platform. As read on 12 November 2026 the front page counted 939,906 projects, 10,173,118 releases, 22,837,935 files and 1,141,478 users, and the statistics page put the sum of all release files at 51.2 TB (terabytes). What it is not is a curated catalogue. Its documentation says that anyone can upload projects of any quality, that PyPI does not pre-screen or review projects before they are published, and that anything on a project page not explicitly labelled as PyPI data or as verified should be assumed to be unverified text supplied by the author.
The index began as PEP (Python Enhancement Proposal) 301, written by Richard Jones, created on 24 October 2002 and implemented for Python 2.3. It proposed a central index server, a register command for Distutils and Trove classifiers in the metadata, and it deliberately left out two things that now define the service: package dependencies, and the storage and download of the packages themselves. Jones wanted the index hosted under python.org to give it an air of legitimacy that earlier catalogue efforts lacked, and for years its address was pypi.python.org. The present service runs on a rewritten codebase called Warehouse. A beta at pypi.org was announced on 26 March 2018, and on 16 April 2018 the new site became the canonical index, with browser traffic and pip install calls redirected from the old address and the legacy codebase due to be shut down on 30 April. The Packaging User Guide's glossary dates the replacement of the domain name itself to 2017.
Warehouse is open source, developed under the Python Packaging Authority (PyPA) and supported by the Packaging Working Group of the Python Software Foundation (PSF), which operates the infrastructure. The scale explains the architecture. In August 2026 the PSF's director of engineering wrote that PyPI takes more than six billion requests a day, about thirteen billion counting file downloads, with package egress of around 10 petabytes a day, and that Fastly's content delivery network (CDN) answers almost all of it at a cache hit ratio just under 99 per cent, so that only about one request in seventy reaches the origin, which runs on Amazon Web Services (AWS) with a PostgreSQL database behind the application. For 2025 PyPI reported 2.56 trillion requests, an average of 81,000 a second, 1.92 exabytes transferred, more than 3.9 million new files and more than 130,000 new projects. The August post also counted the people: one and a half full-time employees for development, security reports and maintenance, and one for support requests. Two consequences matter to whoever writes the firewall or proxy rule: files are downloaded from files.pythonhosted.org, not from pypi.org, and because all traffic is routed through the CDN, the list of PyPI's addresses is Fastly's published list of public ranges.
Installers do not use the website. They use the index API (application programming interface) under https://pypi.org/simple/, standardized as the Simple Repository API. Its first form, PEP 503 by Donald Stufft (September 2015), is a tree of HTML (Hypertext Markup Language) pages: the root has one anchor per project, each project page has one anchor per file, and each link should carry the file's hash as a URL (Uniform Resource Locator) fragment, the name of the hash function such as sha256 followed by the digest. A JSON (JavaScript Object Notation) form followed in May 2022 with PEP 691, selected through the Accept header with the media type application/vnd.pypi.simple.v1+json, and later PEPs added upload times (700), yanking (592), provenance (740) and project status markers (792). In August 2026 PyPI adopted PEP 833, which freezes the HTML representation; new features go into the JSON form only. Project names are compared in normalized form, lower-cased with every run of full stops, hyphens and underscores replaced by a single hyphen, so a project named HolyGrail is served at /simple/holygrail/. pip's default --index-url is https://pypi.org/simple, and its documentation is explicit about what happens when --extra-index-url adds a second index: there is no priority among the locations, all are checked and the best match by version wins.
A release or a project can change state without disappearing. Pre-releases are skipped by installers unless requested. A yanked release is ignored by an installer unless it is the only one matching an exact pin written with == or ===, and PyPI yanks whole releases, not single files; the maintainer's reason is published through the index API. An archived project accepts no new releases but still installs. A quarantined project or release, suspected of malware, spam or a policy violation, cannot be installed or modified and is left out of search and of the index API until an administrator reviews it. The limits are few, and the recent ones are worth knowing: by default 100 MB per file and 10 GB per project, doubled since 26 October 2026 for projects owned by an organization; version strings of at most 128 characters since October 2026; and, since 22 July 2026, no new files in a release more than 14 days old, so that a stolen token cannot add a poisoned file to a long-stable release (PyPI asks users not to rely on that behaviour until PEP 694 defines it).
On the publishing side the index has been replacing secrets that last with ones that expire. Two-factor authentication (2FA) has been mandatory for every account since 1 January 2024, with a time-based one-time password (TOTP) application or a WebAuthn security device, which PyPI prefers because it resists phishing. Uploads need an API token, which can be scoped to one project, or Trusted Publishing, introduced on 20 April 2023: an automated build job presents an OpenID Connect (OIDC) identity token from its platform and, if the project trusts that workflow, receives an upload token valid for 15 minutes. GitHub Actions, GitLab CI/CD (continuous integration and delivery), Google Cloud and ActiveState are supported. Since 14 November 2024 a file can also carry attestations under PEP 740, signed statements in the in-toto format that bind the file's digest to the identity that published it; PyPI accepts two kinds, its own publish attestation and SLSA (Supply-chain Levels for Software Artifacts) provenance. They took the place of PGP (Pretty Good Privacy) signatures, which PyPI stopped accepting on 23 May 2023 after an audit found that only 36 per cent of the keys used in three years could be meaningfully verified. By the end of 2025 more than 50,000 projects used Trusted Publishing and 17 per cent of uploads included an attestation.
The documentation lists what an open index attracts. Typosquatting registers a misspelling of a popular name, such as pyth0n-dateutil for python-dateutil. PyPI rejects a new name that collides with an existing one after removing separators and treating look-alike characters such as l, i and 1 as identical, or that matches a standard-library module, and admits that these checks do not catch everything; in March 2024 a large typosquatting campaign made it halt new user and project registration for a time. Names invented by a large language model (LLM) can be registered in advance by an attacker, which the documentation calls slopsquatting. Dependency confusion publishes on PyPI a package with the name of a company's private one and relies on the installer choosing it. Account takeover, phishing (one campaign used the look-alike domain pypj.org) and the re-registration of expired email domains aim at maintainers instead. The case that changed policy was a supply-chain compromise: PyPI's incident report of 2 April 2026 describes releases of litellm and telnyx, published after an API token was exposed through an exploited Trivy dependency, that carried credential-harvesting malware which ran on install. The poisoned litellm versions were downloaded more than 119,000 times in the 2 hours 32 minutes between upload and quarantine, and PyPI estimated that 40 to 50 per cent of litellm installs were unpinned, fetching the latest version every time.
The defences on the consuming side follow from that. PyPI publishes SHA-256 (Secure Hash Algorithm 256-bit) and BLAKE2b digests for every file and states their limit: a checksum shows that the file is the one on PyPI's servers, not that the code is safe. pip's hash-checking mode, --require-hashes, refuses anything whose digest is not in the requirements file. A lock file with hashes fixes the whole dependency tree, which the output of pip freeze does not. A dependency cooldown, pip's --uploaded-prior-to, skips releases younger than a few days so that reports and quarantine have time to work; PyPI handled 66 per cent of the malware reports of 2025 within 4 hours and 92 per cent within 24. pip's documentation calls --extra-index-url unsafe for private packages, because the public index may win. And for rehearsing a release there is TestPyPI at test.pypi.org, a separate instance with its own accounts and a database that is pruned from time to time.
Also known as: Python Package Index, pypi.org
Sources
- Python Packaging User Guide, Glossary (read 2026-11-12): Python Package Index (PyPI), the default package index for the Python community, open to all Python developers; pypi.org replaced the legacy domain name pypi.python.org in 2017 and is powered by Warehouse
- PyPI, home page (read 2026-11-12): a repository of software for the Python programming language; 939,906 projects, 10,173,118 releases, 22,837,935 files and 1,141,478 users; developed and maintained by the Python Software Foundation and the Python community
- PyPI, Statistics (read 2026-11-12): the sum of release files for all of PyPI is 51.2 TB; the page is cached for 24 hours
- PyPI documentation, home page (read 2026-11-12): pronounced pie-pea-eye, with the PI as individual letters, to minimize confusion with the PyPy project; the official package repository for Python
- PyPI documentation, PyPI Basics (read 2026-11-12): projects, releases and files; pip, PDM, Poetry and uv use PyPI as their default source; pre-release, yanked, archived and quarantined states; PyPI does not pre-screen or review projects; PyPI data, verified data and unverified data
- Richard Jones, PEP 301, Package Index and Metadata for Distutils, created 24 October 2002, Final, Python 2.3 (read 2026-11-12): a central package index server, a Distutils register command and Trove classification; dependencies and the storage and download of packages left out; hosting in the python.org domain for an air of legitimacy
- Python Insider (Ee Durbin, for Sumana Harihareswara and the PyPI team), New PyPI launched, legacy PyPI shutting down April 30, 16 April 2018 (read 2026-11-12): the canonical index is at pypi.org on the new Warehouse codebase; beta announced on 26 March; traffic and pip install redirected from pypi.python.org on 16 April 2018; legacy shutdown planned for 30 April 2018
- PyPI documentation, Who Maintains PyPI? (read 2026-11-12): Warehouse is developed under the Python Packaging Authority and supported by the Packaging Working Group of the Python Software Foundation
- PyPI blog (PSF Director of Engineering), How AWS Powers PyPI and the PSF, 14 August 2026 (read 2026-11-12): over six billion requests a day, about thirteen billion counting file downloads; package egress around 10 petabytes a day; Fastly serves it at a hit ratio just under 99%, about one request in seventy reaching the origin; EC2, RDS Postgres, OpenSearch and S3 on AWS; one and a half full-time employees plus one on support
- PyPI blog (Dustin Ingram), PyPI in 2025: A Year in Review, 31 December 2025 (read 2026-11-12): more than 3.9 million new files and 130,000 new projects, 1.92 exabytes transferred, 2.56 trillion requests, 81,000 requests per second on average; more than 50,000 projects using trusted publishing; 17% of uploads with an attestation; more than 2000 malware reports, 66% handled within 4 hours and 92% within 24 hours
- PyPI documentation, Security and Internals (read 2026-11-12): threats (supply chain, phishing through pypj.org, expired domains, typosquatting and the March 2024 halt of new user and project registration, spam); mandatory 2FA, project-scoped API tokens, Trusted Publishing; quarantine; name normalization against look-alike characters and standard-library names; all traffic is routed through the CDN, whose public IP list is Fastly's
- PyPI blog, Incident Report: File Hosting Errors, 8 September 2026 (read 2026-11-12): files are downloaded from files.pythonhosted.org through Fastly's cache; intermittent 502 and 503 errors for about two weeks in August 2026
- Donald Stufft, PEP 503, Simple Repository API, created 4 September 2015, Final (read 2026-11-12): the base URL https://pypi.org/simple/; one anchor per project and one per file; the hash as a URL fragment; normalized names (lower case, runs of full stop, hyphen and underscore replaced by one hyphen; HolyGrail becomes /holygrail/)
- Python Packaging User Guide, Simple repository API specification, History (read 2026-11-12): PEP 503 in September 2015, yanking (PEP 592) in May 2019, the JSON format (PEP 691) in May 2022, upload time (PEP 700) in October 2022, provenance (PEP 740) in November 2024, project status markers (PEP 792) in July 2025, the HTML representation frozen by PEP 833 in June 2026
- PyPI documentation, Index API (read 2026-11-12): PyPI's implementation of the PEP 503 (HTML) and PEP 691 (JSON) index API; the media types application/vnd.pypi.simple.v1+html and +json; new integrations should use JSON
- PyPI blog, The HTML representation of the index API is now frozen, 11 August 2026 (read 2026-11-12): PyPI has adopted PEP 833; future development focuses on the JSON representation
- pip documentation, pip install (read 2026-11-12): --index-url defaults to https://pypi.org/simple; there is no priority in the locations that are searched, all are checked and the best match is selected; using --extra-index-url for private packages is unsafe (dependency confusion); --require-hashes; --uploaded-prior-to
- PyPI documentation, Storage Limits, updated 2026-10-26 (read 2026-11-12): 100 MB per file and 10 GB per project by default; 200 MB and 20 GB for projects owned by an organization
- PyPI documentation, Yanking (read 2026-11-12): a yanked release is ignored by an installer unless it is the only release matching an == or === specifier; only entire releases can be yanked; the reason is shown in the index APIs
- PyPI blog, Releases now reject new files after 14 days, 22 July 2026 (read 2026-11-12): new files are rejected for releases older than 14 days, to keep long-stable releases from being poisoned with compromised tokens or workflows; users should not rely on it until PEP 694 defines the semantics
- PyPI blog archive, 2026 (read 2026-11-12): PyPI now limits versions to 128 characters, 23 October 2026; higher limits for organization projects, 26 October 2026; developer documentation moved to dev.pypi.org, 14 October 2026
- PyPI blog, 2FA Requirement for PyPI begins 2024-01-01, 13 December 2023 (read 2026-11-12): starting 1 January 2024 all users must enable 2FA to perform management actions or upload files
- PyPI documentation, Two-Factor Authentication (read 2026-11-12): mandatory for all accounts since 2024; a TOTP application or a WebAuthn security device, the latter preferred because it resists phishing; recovery codes
- PyPI blog, Introducing 'Trusted Publishers', 20 April 2023 (read 2026-11-12): publishing with OpenID Connect identity tokens in place of long-lived passwords or API tokens, first with GitHub Actions
- PyPI documentation, Publishing to PyPI with a Trusted Publisher (read 2026-11-12): the CI service's OIDC token is exchanged for a project-scoped API token valid for 15 minutes
- PyPI blog, PyPI now supports digital attestations, 14 November 2024 (read 2026-11-12): support for PEP 740 finalized; attestations are signed by an identity, not a key pair, and link a file to its source repository and workflow
- PyPI documentation, Introduction to Attestations (read 2026-11-12): in-toto attestations with two accepted predicates, SLSA Provenance and PyPI Publish; signed by GitHub Actions, GitLab CI/CD and Google Cloud identities; ActiveState is a Trusted Publisher that does not produce attestations
- SLSA, home page (read 2026-11-12): Supply-chain Levels for Software Artifacts, or SLSA
- PyPI blog, Removing PGP from PyPI, 23 May 2023 (read 2026-11-12): new PGP signatures are ignored; of 1069 unique keys used in three years only 36% could be meaningfully verified
- OpenPGP.org, About (read 2026-11-12): OpenPGP is based on the original PGP (Pretty Good Privacy) software, created by Phil Zimmermann
- PyPI documentation, Protecting Yourself From Common Security Attacks (read 2026-11-12): typosquatting (pyth0n-dateutil), name checks that do not catch every typosquat, slopsquatting of names hallucinated by an LLM, dependency confusion, man-in-the-middle, account takeover, supply chain attacks
- PyPI blog, Incident Report: LiteLLM/Telnyx supply-chain attacks, with guidance, 2 April 2026 (read 2026-11-12): credential-harvesting malware that ran on install, after an API token exposure from an exploited Trivy dependency; litellm downloaded over 119k times; 2h 32m from upload to quarantine; 40 to 50% of installs unpinned; dependency cooldowns; pip freeze does not create a lock file
- PyPI documentation, Verifying Package Integrity (read 2026-11-12): SHA-256 and BLAKE2b checksums for every file; a checksum does not verify that the original code is safe or trustworthy
- NIST Computer Security Resource Center, Glossary, SHA-256 (read 2026-11-12): Secure Hash Algorithm 256-bit, a hash algorithm that can be used to generate digests of messages (from FIPS 180-4)
- Python Packaging User Guide, Using TestPyPI (read 2026-11-12): a separate instance of the index at test.pypi.org with a separate database and accounts, periodically pruned