Attaches callbacks for the resolution and/or rejection of the Promise.
Optionalonfulfilled: ((value: PyPIProject) => TResult1 | PromiseLike<TResult1>) | nullThe callback to execute when the Promise is resolved.
Optionalonrejected: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | nullThe callback to execute when the Promise is rejected.
A Promise for the completion of which ever callback is executed.
Fetches full project metadata including all releases.
GET /pypi/{name}/json
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Fetches only the info block for the latest version of this package.
GET /pypi/{name}/json → extracts info
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Returns a VersionResource for a specific version.
Version string (e.g. '2.31.0')
Returns a VersionResource for the latest published version.
When awaited, fetches GET /pypi/{name}/json and returns the
latest version data (from the info and urls fields).
Returns all version strings published for this package.
GET /pypi/{name}/json → extracts Object.keys(releases)
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Returns the full releases map: version string → distribution files.
GET /pypi/{name}/json → extracts releases
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Returns known vulnerabilities for the latest version from PyPI's advisory database.
GET /pypi/{name}/json → extracts vulnerabilities
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Fetches download totals for the last day, week, and month from pypistats.org.
GET /api/packages/{name}/recent (via pypistats.org)
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Fetches per-day downloads broken down by Python major version (2 vs 3).
GET /api/packages/{name}/python_major (via pypistats.org)
Optionalparams: PyPIDownloadParamsOptional start_date / end_date filters (YYYY-MM-DD)
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Fetches per-day downloads broken down by Python minor version (3.10, 3.11, …).
GET /api/packages/{name}/python_minor (via pypistats.org)
Optionalparams: PyPIDownloadParamsOptional start_date / end_date filters (YYYY-MM-DD)
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Fetches per-day downloads broken down by operating system (Linux, Windows, macOS).
GET /api/packages/{name}/system (via pypistats.org)
Optionalparams: PyPIDownloadParamsOptional start_date / end_date filters (YYYY-MM-DD)
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Fetches per-day downloads split by mirror vs non-mirror traffic.
GET /api/packages/{name}/overall (via pypistats.org)
Optionalparams: PyPIDownloadParamsOptional start_date / end_date filters (YYYY-MM-DD)
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Represents a PyPI project, providing access to metadata, versions, distribution files, download statistics, and vulnerability data.
Implements
PromiseLike<PyPIProject>so it can be awaited directly to fetch the full project, while also exposing sub-resource methods.Example