swh.lister.cran.lister module#

class swh.lister.cran.lister.CRANLister(scheduler: SchedulerInterface, url: str = 'https://cran.r-project.org', instance: str = 'cran', credentials: Dict[str, Dict[str, List[Dict[str, str]]]] | None = None, max_origins_per_page: int | None = None, max_pages: int | None = None, enable_origins: bool = True)[source]#

Bases: StatelessLister[List[Tuple[str, List[Dict[str, Any]]]]]

List all packages hosted on The Comprehensive R Archive Network.

The lister parses and reads the content of the weekly CRAN database dump in RDS format referencing all downloadable package tarballs.

LISTER_NAME: str = 'cran'#
INSTANCE = 'cran'#
get_pages() Iterator[List[Tuple[str, List[Dict[str, Any]]]]][source]#

Yields a single page containing all CRAN packages info.

get_origins_from_page(page: List[Tuple[str, List[Dict[str, Any]]]]) Iterator[ListedOrigin][source]#

Extract a list of model.ListedOrigin from a raw page of results.


page – a single page of results


an iterator for the origins present on the given page of results