letsbuilda.pypi.sync_client¶
The sync client.
Classes¶
A class for interacting with PyPI. |
Module Contents¶
- class letsbuilda.pypi.sync_client.PyPIServices(http_client: httpx.Client)[source]¶
A class for interacting with PyPI.
- 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:
- 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:
- 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: