Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 736 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 736 Bytes

letsbuilda-pypi

A wrapper for PyPI's API and RSS feeds.

Usage

Sync client

from httpx import Client
from letsbuilda.pypi import PyPIServices

http_client = Client()
pypi_client = PyPIServices(http_client)

print(pypi_client.get_rss_feed(pypi_client.NEWEST_PACKAGES_FEED_URL))
print(pypi_client.get_package_metadata("letsbuilda-pypi"))

Async client

from httpx import AsyncClient
from letsbuilda.pypi.async_client import PyPIServices

http_client = AsyncClient()
pypi_client = PyPIServices(http_session)

print(await pypi_client.get_rss_feed(pypi_client.NEWEST_PACKAGES_FEED_URL))
print(await pypi_client.get_package_metadata("letsbuilda-pypi"))