Repository navigation
feat(lists): exact=True for real counts (v1.20.0) - #102
Merged
Merged
Conversation
…ntracts and IDVs (v1.20.0) Past 10,000 matches these endpoints report an estimated count that is only a lower bound, and the SDK had no way to send the API's ?exact=true opt-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vdavez
marked this pull request as ready for review
October 24, 2026 17:50
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.
What
Adds a keyword-only
exact: bool = Falsetolist_opportunities(),list_notices(),list_contracts()andlist_idvs(). When set, the SDK sends the API's?exact=trueopt-in socountis exact rather than estimated. Bumps to 1.20.0.Why
Past 10,000 matches, these endpoints report an estimated
count(count_type == "approximate") that is a lower bound. The API already accepts?exact=true, but the SDK had no way to send it.Changes
tango/client.py: the parameter and its docstring;exact=trueis sent only when set, so default requests are unchanged.scripts/check_filter_shape_conformance.py:exactjoinsNON_FILTER_ARGS(a pagination control likepage/limit, not a filter).docs/API_REFERENCE.md: an "Exact counts" section and a parameter line on each method.tests/test_exact_count.py: sent when asked, omitted by default, keyword-only.Testing
Unit suite passes (12 new tests); ruff, mypy and the conformance check are clean.
Risks
Additive and off by default. An exact count is more expensive for the API on large result sets, so ask only when you need the total.
🤖 Generated with Claude Code