sedai.pagination
class
PaginationConfig:
The pagination configuration for retrieving elements from a paginated API.
Functions that support pagination accept this configuration as a named argument
and return a PageIterator
object that iterates over elements in the collection, by
retrieving pages from the API based on the parameters set in this configuration.
DEFAULT_PAGINATION_CONFIG =
<PaginationConfig object>
The default pagination configuration. Fetches 20 elements per page until all pages are fetched.
class
PageIterator(typing.Generic[~T]):
An iterator that fetches collections of elements in pages. The iterator makes subsequent API requests to fetch pages of elements until your code hits 'break', the end of the collection is reached, or the specified number of pages are fetched.