parsimony-treasury
US Treasury connector plugin for parsimony — federal fiscal datasets (debt, revenue, spending, securities) from the Bureau of the Fiscal Service, plus the Office of Debt Management daily rate feeds (par yield curve, bill rates). Keyless — no API credentials required.
Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-treasury.
Connectors
| Name | Kind | Description |
|---|---|---|
treasury_fetch |
connector | Fetch any Fiscal Data API endpoint (e.g. v2/accounting/od/debt_to_penny) as a DataFrame, with optional filter, sort, and page_size. |
treasury_rates_fetch |
connector | Fetch one Office of Debt Management rate feed (par yield curve, real yield curve, bill rates, long-term, real long-term) for a calendar year from the home.treasury.gov OData/Atom XML feed. |
enumerate_treasury |
enumerator | Enumerate every addressable Fiscal Data time-series measure plus the ODM rate-feed benchmarks for catalog indexing (drives the treasury catalog). |
treasury_search |
connector | Keyword-search the published treasury catalog (query= is literal text; exact constraints via filter=). Returns code + title + METADATA. Dispatch from METADATA: source=fiscal_data → treasury_fetch(endpoint=...); source=treasury_rates → treasury_rates_fetch. Do not parse the compound code. |
Install
pip install parsimony-treasury
Pulls in a compatible parsimony automatically. Verify discovery:
python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"
Quick start
from parsimony_treasury import CONNECTORS
result = CONNECTORS["treasury_fetch"](
endpoint="v2/accounting/od/debt_to_penny",
sort="-record_date",
page_size=10,
)
print(result.raw.head())
For multi-plugin composition:
from parsimony import discover
connectors = discover.load_all()
Catalogs
This plugin ships a treasury catalog (~914 entries) driven by enumerate_treasury. treasury_search loads a published snapshot (overridable via the PARSIMONY_TREASURY_CATALOG_URL env var) and falls back to building one in-process when no snapshot is reachable. Maintainers build and push the snapshot with scripts/build_catalog.py.
Two enumeration sources:
- Fiscal Data — self-tracking (archetype A). The live
/services/dtg/metadata/JSON (the same source the fiscaldata.treasury.gov site consumes) lists every dataset → endpoint → field in one call: 879 measure fields across 180 fetchable endpoints / 53 datasets (live count, 2026-06-09). A new dataset appears in the catalog automatically on the next build. - Office of Debt Management rate feeds — curated registry (archetype D). The 5 daily interest-rate feeds (par yield curve, real yield curve, bill rates, long-term, real long-term) are not in the metadata endpoint; their feed set is the stable interest-rate-statistics dropdown.
scripts/harvest_rate_feeds.pycross-validates the registry's benchmark maturities against the live feed columns.
Coverage
Catalog covers ALL: yes (the metadata endpoint is the authoritative, self-tracking enumeration). Connectors cover ALL accessible data: partial by design — two documented exclusions:
- 3 static-file-only datasets — Monthly Treasury Disbursements, Combined Statement, and Account of Receipts and Expenditures carry no queryable API endpoint (no
endpoint_txt); they are published only as static files, so there is nothing to fetch via the JSON API. - Treasury Coupon Issues + HQM Corporate Bond Yield Curve — a separate product distributed as binary
.xls5-year archives (monthly, for Pension-Protection-Act actuarial use), not part of the daily XML feed family. The HQM spot-rate series are already available through theparsimony-fredconnector (HQMCB20YR, etc.), so this connector defers to FRED for them.
Provider
- Homepage: https://fiscaldata.treasury.gov
- API docs: https://fiscaldata.treasury.gov/api-documentation/
License
See LICENSE.
Metadata
Release files for parsimony-treasury 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| parsimony_treasury-0.0.2.tar.gz | 21.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parsimony_treasury-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.8 kB
Release files / parsimony_treasury-0.0.2.tar.gz
| Download URL | parsimony_treasury-0.0.2.tar.gz |
|---|---|
| Size | 21.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01a5539b4104321b809ecb89bd296bb6447fcaf69fee445eeb804321b6cd59d2
|
|
BLAKE2b-256 checksum How to use checksums |
16903034c5266c7223f207eb2ea507d7b2345e0537aaab089f640943184db9e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / parsimony_treasury-0.0.2-py3-none-any.whl
| Download URL | parsimony_treasury-0.0.2-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d1a818bbb3bd517fb64d9a8b53bf87101ea07deed9e3a45ecd3442bb850dbfc
|
|
BLAKE2b-256 checksum How to use checksums |
639a30c351785e2d6c5209505c1fe56d7a59787bf4c5d4554dd41e9a449de041
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logSecurity for parsimony-treasury 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for parsimony_treasury-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.