Skip to content

feat(lists): exact=True for real counts (v1.20.0) - #102

Merged
vdavez merged 2 commits into
mainfrom
feat/exact-count
Oct 24, 2026
Merged

vdavez merged 2 commits into
mainfrom
feat/exact-count

Conversation

@vdavez

@vdavez vdavez commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds a keyword-only exact: bool = False to list_opportunities(), list_notices(), list_contracts() and list_idvs(). When set, the SDK sends the API's ?exact=true opt-in so count is 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=true is sent only when set, so default requests are unchanged.
  • scripts/check_filter_shape_conformance.py: exact joins NON_FILTER_ARGS (a pagination control like page/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

vdavez and others added 2 commits October 24, 2026 12:46
…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
vdavez marked this pull request as ready for review October 24, 2026 17:50
@vdavez
vdavez merged commit 884612d into main Oct 24, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant