# ListPage

> One page of a list.

Source: https://docs.tryyoursize.com/reference/python/list-page/

*Class* · `tryyoursize`

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.

```python
class ListPage(Dict[str, Any])
```

## Members

- **`data`** (`list`, required): The items of this page.
- **`has_more`** (`bool`, required): Whether another page follows.
- **`next_cursor`** (`Optional[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.

## Example

**Python**

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

**Node.js**

```ts
for await (const page of tys.products.list({ limit: 20 }).pages()) {
  for (const p of page.data) console.log(p.external_id);
}
```

## See also

- [Pagination](https://docs.tryyoursize.com/guides/pagination.md)
