letsbuilda.pypi.sync_client =========================== .. py:module:: letsbuilda.pypi.sync_client .. autoapi-nested-parse:: The sync client. Classes ------- .. autoapisummary:: letsbuilda.pypi.sync_client.PyPIServices Module Contents --------------- .. py:class:: PyPIServices(http_client: httpx.Client) A class for interacting with PyPI. .. py:attribute:: NEWEST_PACKAGES_FEED_URL :type: Final[str] :value: 'https://pypi.org/rss/packages.xml' .. py:attribute:: PACKAGE_UPDATES_FEED_URL :type: Final[str] :value: 'https://pypi.org/rss/updates.xml' .. py:attribute:: http_client .. py:method:: get_rss_feed(feed_url: str) -> list[letsbuilda.pypi.models.RSSPackageMetadata] Get the new packages RSS feed. :param feed_url: The URL of the RSS feed. :returns: The list of new packages. :rtype: list[RSSPackageMetadata] .. py:method:: get_package_json_metadata(package_title: str, package_version: str | None = None) -> letsbuilda.pypi.models.JSONPackageMetadata Retrieve metadata for a package. :raises PackageNotFoundError: If the package is not found. :param package_title: The title of the package. :param package_version: The version of the package. :returns: The metadata for the package. :rtype: JSONPackageMetadata .. py:method:: get_package_metadata(package_title: str, package_version: str | None = None) -> letsbuilda.pypi.models.Package Create a `Package` object from its metadata. :param package_title: The title of the package. :param package_version: The version of the package. :returns: The package object. :rtype: Package