pypi-simple is a client library for the Python Simple Repository API, as specified in PEP 503 and updated by various other PEPs (592, 629, 658, 691, 700, 708, 714, 740, 792). It allows users to query PyPI and other pip-compatible repositories for available projects and their package files, download packages, and inspect their metadata. The current version is 1.8.0. While no explicit release cadence is stated, the project maintains regular updates, with version 1.8.0 released on September 3, 2025.
pip install pypi-simpleVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to fetch details for a specific project like 'requests' using `PyPISimple.get_project_page()`. It also includes a commented-out example for streaming all project names using `stream_project_names()`, with a caution about the size of PyPI's index.
Avoid relying on `provenance_sha256`. Use `provenance_url` if provenance information is needed.
If provenance digest verification is critical, implement it separately after fetching the provenance data.
Ensure your environment uses Python 3.8 or higher.
For specific project information, use `client.get_project_page('projectname')`. If you need to iterate through all projects, use `client.stream_project_names()` for better performance and memory management.Ensure the import path is exactly `from pypi_simple import PyPISimple`.
Always check if the result of `get_project_page()` is `None` before attempting to access its attributes (e.g., `if project_page and project_page.packages:`).
This often points to a problem with the repository or download. You can try downloading again. If it persists, report it to the package maintainers or the repository. The exception object itself might contain `url` fields for more details.