Skip to main content

Connector framework for financial data — search, fetch, and catalog series from FRED, SDMX, FMP, SEC Edgar, and more

Project description

parsimony

PyPI version License Python CI Docs

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 Result carries its source, params, and fetch timestamp alongside the DataFrame.
  • Searchable catalog -- index entities from any source into a Catalog with 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 remain from parsimony import .... The bare parsimony name on PyPI is currently unavailable — we plan to migrate the distribution name to parsimony once 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); requires output=.
  • @loader -- observation persistence (KEY + DATA only); requires output= and a DataStore.

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:

Contributing

See CONTRIBUTING.md for development setup, coding conventions, and the connector checklist.

License

Apache 2.0

Project details


Download files

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

Source Distribution

parsimony_core-0.1.0a1.tar.gz (138.9 kB view details)

Uploaded Source

Built Distribution

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

parsimony_core-0.1.0a1-py3-none-any.whl (170.2 kB view details)

Uploaded Python 3

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

Hashes for parsimony_core-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 7e44883795e9091dd960d7feb016671da996183f671053176a7e91457832a41e
MD5 33a830a3992083f027bf2fca24833b2b
BLAKE2b-256 a0feff00af1f160f311427bc5220db5d70e1f4e965f1edb5c0a3ce3fb61c29ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_core-0.1.0a1.tar.gz:

Publisher: publish.yml on ockham-sh/parsimony

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_core-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for parsimony_core-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 7106da0c2702b2fa2a5544a51f8dd091b12e197ac2b2f60dd0b0a58a96eabd83
MD5 726fe9c67da992e7b36b7a03e5f01f5f
BLAKE2b-256 752759308176ebbbca272a335a2e978e526eed5101714f42eaf301825b12820a

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_core-0.1.0a1-py3-none-any.whl:

Publisher: publish.yml on ockham-sh/parsimony

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page