When you call a list operation (for example
list_instances()) will retrieve a page of results. In order
to retrieve more data, you have to continue to make calls to the list operation, passing in the value of the most recent response’s
as a parameter to the next list operation call.
As a convenience over manually writing pagination code, you can make use of the functions in the
pagination module to:
- Eagerly load all possible results from a list call
- Eagerly load all results from a list call up to a given limit
- Lazily load results (either all results, or up to a given limit) from a list call via a generator. These generators can yield either values/models or the raw response from calling the list operation
pagination module uses retry with the default retry configuration. For more information, check out the Retries documentation.
For an example on how to use these functions, please check GitHub. More details about the API is here.