swh.lister.pypi.lister module

class swh.lister.pypi.lister.PyPILister(override_config=None)[source]

Bases: swh.lister.core.lister_transports.ListerOnePageApiTransport, swh.lister.core.simple_lister.SimpleLister


alias of swh.lister.pypi.models.PyPIModel

LISTER_NAME = 'pypi'
PAGE = 'https://pypi.org/simple/'
instance = 'pypi'
task_dict(origin_type: str, origin_url: str, **kwargs)[source]

(Override) Return task format dict

This is overridden from the lister_base as more information is needed for the ingestion task creation.

list_packages(response: requests.models.Response) → list[source]

(Override) List the actual pypi origins from the response.

origin_url(repo_name: str) → str[source]

Returns origin_url

get_model_from_repo(repo_name: str) → Dict[str, Any][source]

(Override) Transform from repository representation to model