Attaches callbacks for the resolution and/or rejection of the Promise.
Optionalonfulfilled: ((value: PyPIVersionInfo) => 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 metadata for this version.
When created via latest(), fetches GET /pypi/{name}/json and returns
the latest version data. Otherwise fetches GET /pypi/{name}/{version}/json.
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Returns the distribution files (wheels, sdists) for this version.
GET /pypi/{name}/{version}/json → extracts urls
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Returns known vulnerabilities for this version from PyPI's advisory database.
GET /pypi/{name}/{version}/json → extracts vulnerabilities
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Returns the fully resolved dependency graph for this version from deps.dev.
Unlike requires_dist semver ranges, this returns exact resolved versions
for every direct and transitive dependency.
GET /systems/pypi/packages/{name}/versions/{version}:dependencies (via api.deps.dev/v3)
When called on latest(), first fetches the project to determine the current version.
Optionalsignal: AbortSignalOptional AbortSignal to cancel the request
Represents a specific version of a PyPI package.
Implements
PromiseLike<PyPIVersionInfo>so it can be awaited directly.Example