Skip to content

ListPage

Classtryyoursize

One page of a list.

A dict with data, has_more and next_cursor (also as attributes). auto_paging_iter() yields every item, fetching the following pages lazily.

class ListPage(Dict[str, Any])
datalistRequired

The items of this page.

has_moreboolRequired

Whether another page follows.

next_cursorOptional[str]Required

Cursor of the next page.

next_page()Optional[ListPage]Required

The following page, or None at the end.

auto_paging_iter()Iterator[Any]Required

Every item of this page and all following pages.

page = tys.products.list(limit=20)
while page is not None:
for product in page.data:
print(product["external_id"])
page = page.next_page()

Was this page helpful?