Skip to content

reqstorm 2.2.0

Choose a tag to compare

@melihcolpan melihcolpan released this 08 Oct 21:48
· 11 commits to master since this release

Nine additions for long batch jobs against real APIs. No breaking changes.

  • rate_limit="auto": follows the server. Slows down on 429 + Retry-After, spreads requests by X-RateLimit-Remaining / Reset, speeds back up when the server stops pushing back.
  • Pagination: paginate=NextLink("links.next"), LinkHeader(), Cursor(...) or PageNumber(...); works with schemas, so every page becomes typed rows.
  • Command line: reqstorm urls.txt -o results.jsonl --rate 100/min --retries 2, plus --estimate, --template, --paginate, --schema, --cache, --proxy, --report.
  • Token refresh: auth=BearerAuth(token, refresh=get_token) renews an expired token on 401 and resends; concurrent 401s share one refresh.
  • Requests from data: from_template(url, rows) with read_csv / read_sql.
  • Run report: results.report() with p50/p90/p95/p99, statuses, errors and per-host figures; also in summary() and Summary.report.
  • Caching: Cache("responses.sqlite", ttl=...) revalidates with If-None-Match; unchanged resources cost a 304.
  • Proxies: one URL, a rotating list, or Request(proxy=...).
  • Pydantic: pass a Pydantic 2 model as schema= (pip install "reqstorm[pydantic]").

Guides: https://reqstorm.github.io