oci
2.96.0
  • Installation
  • Configuration
  • Using FIPS-validated Libraries
  • Forward Compatibility
  • New Region Support
  • Backward Compatibility
  • Quickstart
  • Known Issues
  • Logging
  • Exception handling
  • Uploading Large Objects
  • Raw Requests
  • Composite Operations and Waiters
  • Pagination
  • API Reference
  • Customizing Service Clients
  • SDK Behaviors
  • Contributions
  • Notifications
  • License
  • Questions or Feedback
oci
  • Docs »
  • Pagination
  • View page source

Pagination¶

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 next_page attribute 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

The 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.

Next Previous

© Copyright 2016, 2023, Oracle

Built with Sphinx using a theme provided by Read the Docs.