U.S. Treasury connector for the parsimony framework
Project description
parsimony-treasury
US Treasury Fiscal Data connector plugin for parsimony — debt, revenue, spending, securities, and other federal fiscal datasets from the Bureau of the Fiscal Service.
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 as a tidy DataFrame, with optional filter, sort, and page size. |
enumerate_treasury |
enumerator | Enumerate every Treasury Fiscal Data dataset and endpoint for catalog indexing (drives the treasury catalog). |
Install
pip install parsimony-treasury
Pulls in parsimony-core>=0.4,<0.5 automatically. Verify discovery:
python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"
Quick start
import asyncio
from parsimony_treasury import CONNECTORS
async def main():
connectors = CONNECTORS.bind_env()
result = await connectors["treasury_fetch"](
endpoint="v2/accounting/od/debt_to_penny",
sort="-record_date",
page_size=10,
)
print(result.data.head())
asyncio.run(main())
For multi-plugin composition:
from parsimony import discover
connectors = discover.load_all().bind_env()
Catalog publishing
This plugin publishes a catalog under the treasury namespace, backed by enumerate_treasury (param-less; walks the Fiscal Data dataset metadata API).
parsimony publish --provider treasury --target "hf://<your-org>/parsimony-treasury"
The {namespace} placeholder in --target is substituted with treasury at publish time; targets support file://, hf://, and s3:// schemes.
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.5.0.tar.gz.
File metadata
- Download URL: parsimony_treasury-0.5.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fda9ac3a0f48e0dfe5d1b276d6a596baebeedac0f6dfe4908a6e5d72a83ea825
|
|
| MD5 |
a145549306a5de20e473d50236d4ac44
|
|
| BLAKE2b-256 |
bddfa159d81b302bd938b1ac5c2d344e2696ca0901b37be1b46ab4c18aba07c1
|
Provenance
The following attestation bundles were made for parsimony_treasury-0.5.0.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.5.0.tar.gz -
Subject digest:
fda9ac3a0f48e0dfe5d1b276d6a596baebeedac0f6dfe4908a6e5d72a83ea825 - Sigstore transparency entry: 1453273433
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony-connectors@db37b495a6c7b7c5a4e5bfdfa5b5b4d74ac4b1b6 -
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@db37b495a6c7b7c5a4e5bfdfa5b5b4d74ac4b1b6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file parsimony_treasury-0.5.0-py3-none-any.whl.
File metadata
- Download URL: parsimony_treasury-0.5.0-py3-none-any.whl
- Upload date:
- Size: 15.7 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 |
bbfffbb5cb78a2973ead4eb83369b60584bbefb267d81c7cb34439b76d5741cd
|
|
| MD5 |
44b9ae198729826bf993a923ddb7a781
|
|
| BLAKE2b-256 |
46b1a8022884b6098e78d3dbdbb0fe4cf065050e6a4c8c21193c8447d1eee56d
|
Provenance
The following attestation bundles were made for parsimony_treasury-0.5.0-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.5.0-py3-none-any.whl -
Subject digest:
bbfffbb5cb78a2973ead4eb83369b60584bbefb267d81c7cb34439b76d5741cd - Sigstore transparency entry: 1453273526
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony-connectors@db37b495a6c7b7c5a4e5bfdfa5b5b4d74ac4b1b6 -
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@db37b495a6c7b7c5a4e5bfdfa5b5b4d74ac4b1b6 -
Trigger Event:
workflow_dispatch
-
Statement type: