Skip to main content

centralbank-data

Unified Python SDK, CLI, local metadata catalog & cache, and MCP server for European and UK central bank data warehouses — starting with the European Central Bank (ECB).

centralbank-data is built library-first with a 2-dependency pure-Python core (httpx + defusedxml): downstream Python applications, risk/analytics pipelines, and notebooks can import the core package directly with zero MCP, pandas, pyarrow, or lxml overhead, while AI agents query the exact same normalized service through a compact, read-only MCP surface.

Status: v0.3.0 — All 10 roadmap providers (ECB, Bank of England, BIS, Bundesbank, Norges Bank, Eurostat, NBB, SNB, Sveriges Riksbank, Danmarks Nationalbank), cbdata CLI, and 6-tool FastMCP 4 MCP server are implemented and verified.

Quick Start

# Core Python SDK + CLI (only httpx + defusedxml, Python >=3.11)
uv add centralbank-data

# With optional FastMCP 4 MCP server
uv add "centralbank-data[mcp]"
from centralbank_data import CentralBankService

cb = CentralBankService()
hits = cb.search("EUR/USD")
exr = cb.get_series("ecb:EXR:D.USD.EUR.SP00.A", last_n=5)
cbdata search "Deposit Facility Rate"
cbdata fetch ecb:FM:D.U2.EUR.4F.KR.DFR.LEV --last-n 5 --format csv
centralbank-data-mcp --transport stdio

Why this exists

European and UK central banks publish rich, free, authoritative macroeconomic and financial datasets — policy rates, yield curves, exchange rates, HICP inflation, money supply, bank lending surveys, credit aggregates, and balance sheets — but their data warehouses are fragmented across:

  • SDMX 2.1 / 3.0 REST APIs (ECB, Deutsche Bundesbank, Norges Bank, National Bank of Belgium, BIS, Eurostat)
  • Custom REST / Cube & StatBank APIs (Swiss National Bank, Sveriges Riksbank, Danmarks Nationalbank)
  • Legacy CSV endpoints (Bank of England IADB)

Working directly against these warehouses has two recurring friction points:

  1. Cryptic series keys & heavy metadata: querying ECB requires knowing keys like FM.D.U2.EUR.4F.KR.DFR.LEV across 215 SDMX dataflows; Bank of England IADB has no search API at all; Eurostat's dataflow catalog alone is 7.08 MB (8,167 datasets).
  2. Inconsistent wire formats & dialects: CSV delimiters (, vs ;, locale-dependent on Bundesbank), UTF-8 BOMs, missing-value tokens ("." on Bundesbank, blank cells on BoE), non-ISO dates (02 Jan 2026, 2026M11D26), and historical revisions vary by bank.

centralbank-data solves both once:

  • Normalized data model: exact-key SeriesID (<provider>:<dataset>:<key>), one Observation schema with full-series atomic replace caching, and canonical cross-bank indicator mappings.
  • Local SQLite FTS5 catalog & observation cache: plain-English search (sanitized against FTS5 syntax errors) across dataflows, codelists, and curated series without dumping megabytes of SDMX XML into LLM context.
  • Multiple thin interfaces over one synchronous core:
    • Python SDK (pip install centralbank-data) — 2 pure-Python deps (httpx, defusedxml), zero MCP/pandas/pyarrow/lxml bloat.
    • CLI (cbdata) — ad-hoc inspection, catalog sync, CSV/JSON output.
    • MCP server (pip install "centralbank-data[mcp]") — compact, read-only 5-tool FastMCP 4 server over stdio or Streamable HTTP.

Roadmap (10 High-Signal Providers)

Phase Central Banks / Hubs Protocol Family
Phase 1 (v0.1.0) ECB (215 dataflows on data-api.ecb.europa.eu) SDMX 2.1 dialect engine (defusedxml + csv)
Phase 2 (v0.2.0) Bank of England (BoE IADB) + BIS, Bundesbank, Norges Bank, Eurostat, NBB BoE IADB CSV adapter + 5 SDMX profiles + cb_compare_indicators
Phase 3 (v0.3.0) SNB, Sveriges Riksbank (SWEA + SWESTR), Danmarks Nationalbank Non-Eurozone sovereign REST / Cube / StatBank adapters

(Narrow FX-only/SOAP adapters and redundant/WAF-blocked Eurozone NCBs are documented in docs/CENTRAL_BANKS.md and intentionally parked — their headline FX and policy rates are already covered via ECB and BIS.)

Documentation

License

Apache-2.0 — see LICENSE.

Metadata

Release files for centralbank-data 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for centralbank-data 0.8.1
File Size Uploaded Provenance Actions
centralbank_data-0.8.1.tar.gz 289.2 kB Without provenance Details for centralbank_data-0.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for centralbank-data 0.8.1
File Interpreter ABI Platform Actions
centralbank_data-0.8.1-py3-none-any.whl Python 3 none any Details for centralbank_data-0.8.1-py3-none-any.whl

Total release size: 421.7 kB

Release files / centralbank_data-0.8.1.tar.gz

Download URL centralbank_data-0.8.1.tar.gz
Size 289.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b67be7fcdf75fa67c02cd46b5134493c3f016cf0e37d64694f3268de97568117
BLAKE2b-256 checksum
How to use checksums
48737a0bd11bb9d5ebace758fb41a1c06b7acfe44fd84e27e090dfc051a87ce5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / centralbank_data-0.8.1-py3-none-any.whl

Download URL centralbank_data-0.8.1-py3-none-any.whl
Size 132.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
660885e20b8b1dc0bced888d38febf697e9d3f3e89206ebe9ce359cc8b6da78e
BLAKE2b-256 checksum
How to use checksums
24f9b08c7a69abe2d2000ec838ca25ecaf1b1aad4c41edd57f130cd3ea9e5f51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for centralbank-data 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files No provenance

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