Skip to main content

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_datatreasury_fetch(endpoint=...); source=treasury_ratestreasury_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.py cross-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 datasetsMonthly 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 .xls 5-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 the parsimony-fred connector (HQMCB20YR, etc.), so this connector defers to FRED for them.

Provider

License

See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsimony_treasury-0.0.2.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsimony_treasury-0.0.2-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_treasury-0.0.2.tar.gz.

File metadata

  • Download URL: parsimony_treasury-0.0.2.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_treasury-0.0.2.tar.gz
Algorithm Hash digest
SHA256 01a5539b4104321b809ecb89bd296bb6447fcaf69fee445eeb804321b6cd59d2
MD5 196069a61630594f4f3ac19a6078fd3d
BLAKE2b-256 16903034c5266c7223f207eb2ea507d7b2345e0537aaab089f640943184db9e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_treasury-0.0.2.tar.gz:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parsimony_treasury-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for parsimony_treasury-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d1a818bbb3bd517fb64d9a8b53bf87101ea07deed9e3a45ecd3442bb850dbfc
MD5 475ef532d5442588dba1b0cf6858162c
BLAKE2b-256 639a30c351785e2d6c5209505c1fe56d7a59787bf4c5d4554dd41e9a449de041

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_treasury-0.0.2-py3-none-any.whl:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page