singer_sdk.pagination.SimpleHeaderPaginator

class singer_sdk.pagination.SimpleHeaderPaginator[source]

Paginator class for APIs returning a pagination token in the response headers.

__init__(key, *args, **kwargs)[source]

Create a new paginator.

Parameters:
  • key (str) – Header key that contains the next page token.

  • args (Any) – Paginator positional arguments for base class.

  • kwargs (Any) – Paginator keyword arguments for base class.

Return type:

None

get_next(response)[source]

Get the next page token.

Parameters:

response (requests.Response) – API response object.

Returns:

The next page token.

Return type:

str | None