singer_sdk.pagination.JSONPathPaginator

class singer_sdk.pagination.JSONPathPaginator[source]

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

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

Create a new paginator.

Parameters:
  • jsonpath (str) – A JSONPath expression.

  • 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