letsbuilda.pypi.async_client¶
The async client.
Classes¶
A class for interacting with PyPI. |
Module Contents¶
- class letsbuilda.pypi.async_client.PyPIServices(http_client: httpx.AsyncClient)[source]¶
A class for interacting with PyPI.
- async get_rss_feed(feed_url: str) list[letsbuilda.pypi.models.RSSPackageMetadata] [source]¶
Get the new packages RSS feed.
- Parameters:
feed_url – The URL of the RSS feed.
- Returns:
The list of new packages.
- Return type:
- async get_package_json_metadata(package_title: str, package_version: str | None = None) letsbuilda.pypi.models.JSONPackageMetadata [source]¶
Retrieve metadata for a package.
- Raises:
PackageNotFoundError – If the package is not found.
- Parameters:
package_title – The title of the package.
package_version – The version of the package.
- Returns:
The metadata for the package.
- Return type:
- async get_package_metadata(package_title: str, package_version: str | None = None) letsbuilda.pypi.models.Package [source]¶
Create a Package object from its metadata.
- Parameters:
package_title – The title of the package.
package_version – The version of the package.
- Returns:
The package object.
- Return type: