U.S. Treasury (Fiscal Data + Office of Debt Management rate feeds) connector for the parsimony framework
Project description
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 | Semantic-search the published treasury catalog and return matching code + title + score rows. Routing: home/<feed> → treasury_rates_fetch; v<n>/<endpoint>#<field> → treasury_fetch. |
Install
pip install parsimony-treasury
Pulls in a compatible parsimony-core 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.data.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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parsimony_treasury-0.0.1.tar.gz.
File metadata
- Download URL: parsimony_treasury-0.0.1.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
037a453bd225f59bca495ba00d498980ed1c7b50003221b33af934150fa8a8a5
|
|
| MD5 |
ad25cea7e2f0c4e9399c4d5ec91e000f
|
|
| BLAKE2b-256 |
a3d252ee6ad3cd6e1b7c0f53e0975e2a6173a710e797bd672aafd43eaa669b91
|
Provenance
The following attestation bundles were made for parsimony_treasury-0.0.1.tar.gz:
Publisher:
release.yml on ockham-sh/parsimony-connectors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_treasury-0.0.1.tar.gz -
Subject digest:
037a453bd225f59bca495ba00d498980ed1c7b50003221b33af934150fa8a8a5 - Sigstore transparency entry: 1971030520
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony-connectors@517cb5874f97ffede7738611ed75bb3ed27e26a0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@517cb5874f97ffede7738611ed75bb3ed27e26a0 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file parsimony_treasury-0.0.1-py3-none-any.whl.
File metadata
- Download URL: parsimony_treasury-0.0.1-py3-none-any.whl
- Upload date:
- Size: 24.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b63675bf4752fdaddf84483ea8230531947a9d33ad116ef823f14fb01182b006
|
|
| MD5 |
015335e57964183b05860806ef0a66a7
|
|
| BLAKE2b-256 |
6047f555a3fcb6392bc6f01d69c669464f92ae38de3598747126213c8e735732
|
Provenance
The following attestation bundles were made for parsimony_treasury-0.0.1-py3-none-any.whl:
Publisher:
release.yml on ockham-sh/parsimony-connectors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_treasury-0.0.1-py3-none-any.whl -
Subject digest:
b63675bf4752fdaddf84483ea8230531947a9d33ad116ef823f14fb01182b006 - Sigstore transparency entry: 1971030584
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony-connectors@517cb5874f97ffede7738611ed75bb3ed27e26a0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@517cb5874f97ffede7738611ed75bb3ed27e26a0 -
Trigger Event:
workflow_dispatch
-
Statement type: