Client Reference¶
This module contains the client classes used to interact with the PyPI APIs.
- class pypiwrap.client.PyPIClient(host='https://pypi.org')¶
Client for the PyPI JSON and Stats API.
Warning
This client is only designed for hosts under the pypi.org domain.
- Parameters:
host (str, optional) – The base URL of the PyPI API host. Defaults to https://pypi.org.
- class pypiwrap.client.PyPIFeedClient(host='https://pypi.org')¶
Client for the PyPI RSS feeds.
Added in version 2.0.0.
Warning
This client is only designed for hosts under the pypi.org domain.
- Parameters:
host (str, optional) – The base URL of the PyPI feeds host. Defaults to https://pypi.org.
- class pypiwrap.client.SimpleRepoClient(host: str = 'https://pypi.org')¶
Client for the PyPI Simple Repository API (version 1).
The methods included will emit a
UnexpectedVersionWarningwarning if it receives a response with a minor version greater than what’s supported.As per PEP 629, the client will throw a
UnsupportedVersionErrorexception if it receives a response with a major version greater than what’s supported.- Parameters:
host (str, optional) – The base URL of the Simple Repository API host. Defaults to https://pypi.org.
- get_index_page() IndexPage¶
Gets the index page for this repository.
Warning
If you’re using the PyPI host, the response returned by PyPI could take several seconds to parse. Please use this method sparingly.
- get_project_page(project: str) ProjectPage¶
Gets the project page for a given
project.