strands.types.collections
Generic collection types for the Strands SDK.
PaginatedList
Section titled “PaginatedList”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.
__init__
Section titled “__init__”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.