letsbuilda.pypi.sync_client =========================== .. py:module:: letsbuilda.pypi.sync_client .. autoapi-nested-parse:: The sync client. Exceptions ---------- .. autoapisummary:: letsbuilda.pypi.sync_client.PackageNotFoundError Classes ------- .. autoapisummary:: letsbuilda.pypi.sync_client.JSONPackageMetadata letsbuilda.pypi.sync_client.Package letsbuilda.pypi.sync_client.RSSPackageMetadata letsbuilda.pypi.sync_client.PyPIServices Module Contents --------------- .. py:exception:: PackageNotFoundError(package_title: str, package_version: str | None) Bases: :py:obj:`Exception` Raised when a package is not found. .. py:class:: JSONPackageMetadata Package metadata. .. py:attribute:: info :type: Info .. py:attribute:: last_serial :type: int .. py:attribute:: urls :type: list[URL] .. py:attribute:: vulnerabilities :type: list[Vulnerability] .. py:method:: from_dict(data: dict) -> Self :classmethod: Build an instance from a dictionary. .. py:class:: Package Metadata for a package. .. py:attribute:: title :type: str .. py:attribute:: releases :type: list[Release] .. py:method:: from_json_api_data(data: letsbuilda.pypi.models.models_json.JSONPackageMetadata) -> Self :classmethod: Build an instance from the JSON API data. .. py:class:: RSSPackageMetadata RSS Package metadata. .. py:attribute:: title :type: str .. py:attribute:: version :type: str | None .. py:attribute:: package_link :type: str .. py:attribute:: guid :type: str | None .. py:attribute:: description :type: str | None .. py:attribute:: author :type: str | None .. py:attribute:: publication_date :type: datetime.datetime .. py:method:: build_from(data: dict[str, str]) -> Self :classmethod: Build an instance from raw data. .. 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:method:: get_rss_feed(feed_url: str) -> list[letsbuilda.pypi.models.RSSPackageMetadata] Get the new packages RSS feed. .. py:method:: get_package_json_metadata(package_title: str, package_version: str | None = None) -> letsbuilda.pypi.models.JSONPackageMetadata Get metadata for a package. .. py:method:: get_package_metadata(package_title: str, package_version: str | None = None) -> letsbuilda.pypi.models.Package Get metadata for a package.