Skip to content

strands.types.collections

Generic collection types for the Strands SDK.

class PaginatedList(list, Generic[T])

Defined in: src/strands/types/collections.py:8

A generic list-like object that includes a pagination token.

This maintains backwards compatibility by inheriting from list, so existing code that expects List[T] will continue to work.

def __init__(data: list[T], token: str | None = None)

Defined in: src/strands/types/collections.py:15

Initialize a PaginatedList with data and an optional pagination token.

Arguments:

  • data - The list of items to store.
  • token - Optional pagination token for retrieving additional items.