Connector framework for financial data — search, fetch, and catalog series from FRED, SDMX, FMP, SEC Edgar, and more
Project description
parsimony
Typed, composable data connectors with searchable catalogs for Python.
Why parsimony?
- Unified interface -- one async calling convention (
await connectors["name"](params)) across FRED, SDMX, FMP, SEC Edgar, Polymarket, and more. - Typed parameters -- every connector validates input through a Pydantic model with a JSON Schema for agent integration.
- Provenance on every result -- every
Resultcarries its source, params, and fetch timestamp alongside the DataFrame. - Searchable catalog -- index entities from any source into a
Catalogwith optional vector embeddings for semantic search. - MCP integration -- expose connectors as Model Context Protocol tools for AI agents.
Install
pip install parsimony-core # FRED, ECB, Eurostat, IMF, World Bank + all httpx connectors
pip install parsimony-core[sec] # + SEC Edgar
pip install parsimony-core[all] # everything (adds semantic search, MCP server)
Installed from PyPI as
parsimony-core; imports remainfrom parsimony import .... The bareparsimonyname on PyPI is currently unavailable — we plan to migrate the distribution name toparsimonyonce it becomes available. The import path will not change.
30-Second Example (No API Key)
Fetch daily USD/EUR exchange rates from the ECB:
import asyncio
from parsimony.connectors.sdmx import CONNECTORS as SDMX
async def main():
result = await SDMX["sdmx_fetch"](
dataset_key="ECB-EXR",
series_key="D.USD.EUR.SP00.A",
start_period="2024-01",
)
print(result.data.tail())
print(result.provenance)
asyncio.run(main())
series_key title ... TIME_PERIOD value
D.USD.EUR.SP00.A US dollar/Euro (EXR) ... 2024-12-27 1.0427
D.USD.EUR.SP00.A US dollar/Euro (EXR) ... 2024-12-30 1.0389
With API Keys
FRED provides US macroeconomic data. Get a free key at fred.stlouisfed.org:
from parsimony.connectors.fred import CONNECTORS as FRED
fred = FRED.bind_deps(api_key="your-key")
# Search
search = await fred["fred_search"](search_text="US unemployment rate")
print(search.data[["id", "title"]].head())
# Fetch
result = await fred["fred_fetch"](series_id="UNRATE", observation_start="2020-01-01")
print(result.data.tail())
print(result.provenance)
Built-in Data Sources
| Source | API Key | Category |
|---|---|---|
| FRED (Federal Reserve Economic Data) | Free | Macro |
| SDMX (ECB, Eurostat, IMF, World Bank, BIS) | None | Macro |
| FMP (Financial Modeling Prep) | Paid | Equities |
| SEC Edgar | None | Filings |
| EODHD (End of Day Historical Data) | Paid | Multi-asset |
| Polymarket | None | Prediction markets |
| CoinGecko | Free | Crypto |
| Finnhub | Free | News & events |
| Tiingo | Free | Equities |
| Alpha Vantage | Free | Equities |
| EIA (Energy Information Administration) | Free | Energy |
| BLS (Bureau of Labor Statistics) | Free | Employment |
| US Treasury | None | Bonds |
| Central Banks (SNB, RBA, Riksbank, BDE, BOJ, BOC, BDP, BDF, Destatis) | None | Macro |
Features
Three decorator primitives -- all produce the same Connector runtime type:
@connector-- typed fetch/search;output=is optional for schema-aware results.@enumerator-- catalog population (KEY + TITLE + METADATA, no DATA); requiresoutput=.@loader-- observation persistence (KEY + DATA only); requiresoutput=and aDataStore.
Catalog -- Catalog indexes entities by (namespace, code) from any connector result. Supports text search out of the box and semantic search with optional LiteLLMEmbeddingProvider.
Provenance -- every result tracks source, parameters, and fetch timestamp. Serialize to Arrow/Parquet for reproducible pipelines.
Composable routing -- combine connectors from multiple sources with +, bind dependencies once with bind_deps(), attach callbacks with with_callback().
MCP server -- run python -m parsimony.mcp to expose all configured connectors as MCP tools for Claude, GPT, and other AI agents.
Documentation
Full docs at docs.parsimony.dev:
- Quickstart -- zero to fetching data in five minutes
- User Guide -- custom connectors, catalog, data stores
- Architecture -- design principles and internals
- API Reference -- full class and function reference
- Connector Guide -- building new connectors
Contributing
See CONTRIBUTING.md for development setup, coding conventions, and the connector checklist.
License
Apache 2.0
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_core-0.1.0a1.tar.gz.
File metadata
- Download URL: parsimony_core-0.1.0a1.tar.gz
- Upload date:
- Size: 138.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e44883795e9091dd960d7feb016671da996183f671053176a7e91457832a41e
|
|
| MD5 |
33a830a3992083f027bf2fca24833b2b
|
|
| BLAKE2b-256 |
a0feff00af1f160f311427bc5220db5d70e1f4e965f1edb5c0a3ce3fb61c29ab
|
Provenance
The following attestation bundles were made for parsimony_core-0.1.0a1.tar.gz:
Publisher:
publish.yml on ockham-sh/parsimony
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_core-0.1.0a1.tar.gz -
Subject digest:
7e44883795e9091dd960d7feb016671da996183f671053176a7e91457832a41e - Sigstore transparency entry: 1328675954
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony@96741ccdad1d296ba251c03216dd8c71124b790f -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96741ccdad1d296ba251c03216dd8c71124b790f -
Trigger Event:
release
-
Statement type:
File details
Details for the file parsimony_core-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: parsimony_core-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 170.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7106da0c2702b2fa2a5544a51f8dd091b12e197ac2b2f60dd0b0a58a96eabd83
|
|
| MD5 |
726fe9c67da992e7b36b7a03e5f01f5f
|
|
| BLAKE2b-256 |
752759308176ebbbca272a335a2e978e526eed5101714f42eaf301825b12820a
|
Provenance
The following attestation bundles were made for parsimony_core-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on ockham-sh/parsimony
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_core-0.1.0a1-py3-none-any.whl -
Subject digest:
7106da0c2702b2fa2a5544a51f8dd091b12e197ac2b2f60dd0b0a58a96eabd83 - Sigstore transparency entry: 1328675984
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony@96741ccdad1d296ba251c03216dd8c71124b790f -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96741ccdad1d296ba251c03216dd8c71124b790f -
Trigger Event:
release
-
Statement type: