requests library. If you prefer httpx, the interface is nearly identical.
Setup
setup.py
Fetch observations
Output
Point-in-time query
Output
Yield curve
Output
Pagination helper
Most endpoints return up to 1,000 rows per request. Page through results withcursor:
helpers.py
Error handling
status to decide how to handle it — 429 means back off, 400 means fix your request, 401 means check your key.