swh.core.api.classes module

class swh.core.api.classes.PagedResult(*args, **kwds)[source]

Bases: typing.Generic

Represents a page of results; with a token to get the next page

results: List[TResult]
next_page_token: Optional[TToken] = None
swh.core.api.classes.stream_results(f: Callable[[], swh.core.api.classes.PagedResult[TResult, TToken]], *args, **kwargs) → Iterable[TResult][source]

Consume the paginated result and stream the page results