Repository navigation
Conversation
Adds iter_export_rows to ProoflineClient and AsyncProoflineClient. It reuses iter_export_pages for cursors, filters and max_pages, and adds a max_rows bound that raises pagination-limit instead of truncating. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A reporting workflow, such as pulling a month of review data into a script or spreadsheet, needs every row in the window, not the pages that carry them. Today that means looping over
iter_export_pagesand flatteningpage.rowsby hand, as the README example does.iter_export_rowsdoes that on both clients.What it does
ProoflineClientandAsyncProoflineClientwith the same signature asiter_export_pages, plusmax_rows.iter_export_pages, so cursor validation, filters and themax_pagesbound are unchanged, and rows from a page with an invalid cursor are never yielded.max_rows(default 100,000, range 1..1,000,000) follows theiter_reviewsmax_itemspattern: a window with more rows raisesurn:proofline:sdk:pagination-limitafter yieldingmax_rowsrows, rather than truncating silently. Both bounds are validated before any request.scripts/contracts.pyand documented in the README export section.Tests
New tests in
tests/test_http.py, each run against the sync and async clients on the loopback server:max_rows/max_pagesvalues rejected before any requestpython3 scripts/check.pypasses (generation, HTTP contracts, wheel and sdist installs),pytestpasses 258 tests,ruffis clean, andmypyreports no new errors.Rows carry no cursor, so the README points to
iter_export_pagesfor resuming an interrupted export. Happy to add a(row, cursor)variant if that would be useful.🤖 Generated with Claude Code