Overview
Every list endpoint returns a Page[T] object. You can either paginate manually using the .links and .meta fields, or let the SDK handle it automatically with iter().
The Page[T] Object
Loop through pages yourself by checking page.links.next:
Every resource exposes an iter() method that fetches pages on demand and yields items one at a time. This is the recommended approach for processing complete result sets.
Iterate all frameworks
Iterate all articles in a framework
Iterate with a custom page size
Use per_page to control how many items are fetched per HTTP request. Larger values reduce the number of requests but use more memory per page.
Collecting Results into a List
For large frameworks, collecting everything into a list can use significant memory. Prefer streaming with a for loop when you don’t need random access.
The per_page Parameter
All list() and iter() methods accept a per_page parameter:
- Minimum:
1
- Maximum:
100
- Default:
20
Checking Total Count Without Fetching All Items
Request a single item to read meta.total without loading the full data set:
Detailed Examples
Process all frameworks with progress reporting
Collect all requirements across all frameworks
Paginate with an offset (skip first N items)
Stop iteration early
Because iter() yields lazily, you can stop at any point without fetching the remaining pages:
iter() is lazy — it only fetches the next page when the current page’s items are exhausted. If you break out of the loop early, no unnecessary HTTP requests are made.