Skip to main content
Paginated list result. Async clients use AsyncPage (same shape with async methods).

Page

Bases: Generic[T] A single page of results from a Modus list endpoint (sync). Iterating yields the current page only. Use auto_paging_iter() to walk every page, or get_next_page() to advance manually. For async clients, see AsyncPage.

has_next_page()

Return True if more pages are available.

get_next_page()

Fetch and return the next page. Raises ValueError if no next page.

auto_paging_iter()

Iterate over all items across all pages, fetching lazily as needed. Warning: may make multiple API calls for large result sets.

AsyncPage

Bases: Generic[T] A single page of results from a Modus list endpoint (async).

has_next_page()

Return True if more pages are available.

get_next_page()

Fetch and return the next page. Raises ValueError if no next page.

auto_paging_iter()

Async-iterate over all items across all pages, fetching lazily as needed.
  • Usage:
    • async for item in page.auto_paging_iter(): process(item)