parsimony-boj
Bank of Japan connector — Japanese interest rates, FX, money & deposits, flow of funds, TANKAN, prices (CGPI/SPPI), balance of payments and BIS-related statistics, as numeric time series via the BOJ Time-Series Data Search API.
Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-boj.
Connectors
| Name | Kind | Description |
|---|---|---|
boj_databases_search |
connector | Step 1. Search the 50 statistics databases; returns a db code (e.g. FM08) and the series_namespace for step 2. |
boj_series_search |
connector | Step 2. Search series within one database (db=…); returns code + db for boj_fetch. |
boj_fetch |
connector | Fetch observations by database + series code(s) (e.g. db=FM08, code=FXERD01,FXERD04). Max 250 codes; large requests are paginated transparently. |
enumerate_boj |
enumerator | Catalog feed: one row per series (~326k) and one per database (50), from a per-DB getMetadata fan-out. |
Discovery chain: boj_databases_search → boj_series_search(db=...) → boj_fetch.
Discovery model
BoJ has no native keyword search, so discovery is a built catalog. The API
also exposes no way to list its databases (getMetadata requires a db),
so the universe is enumerated two ways (archetype C + B):
- A frozen 50-database registry (the C part). The list is transcribed from
the official API manual and cross-validated against the machine-readable
api_tool.xlsxDB_Namesheet — both agree exactly.scripts/harvest_databases.pyregenerates it (--diffchecks for drift). - A live per-database
getMetadatafan-out (the B part).getMetadatais uncapped — one call returns every series in a database (theCO/TANKAN database alone is 166,513 series) — so each per-DB series catalog is complete.
The published catalog is multi-bundle: a boj_databases bundle (the 50 DBs)
plus one boj_series_<db> bundle per database, built lazily and LRU-cached. This
two-tier shape (like parsimony-bls) keeps each namespace tractable for the
326k-series universe. Every series is fetchable by (db, code) regardless of
catalog coverage — the boundary is discovery, not access.
Install
pip install parsimony-boj
Pulls in a compatible parsimony automatically. Verify discovery:
python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"
Configuration
No configuration required — the BOJ API is open and unauthenticated.
The search connectors read published catalog snapshots (default root
hf://parsimony-dev/boj). Override with PARSIMONY_BOJ_CATALOG_URL or
catalog_root= at call time; a missing snapshot is built on demand from the live
metadata and cached in an LRU.
Request limits.
boj_fetchaccepts up to 250 series codes per call, all of the same frequency (a BoJ rule). The API also caps each response at 60,000 data points(series × periods);boj_fetchpaginates over that limit automatically (via the API'sNEXTPOSITIONcursor), so a large multi-series request returns its full result rather than a silent truncation.
Quick start
from parsimony_boj import CONNECTORS
# step 1: find the database
dbs = CONNECTORS["boj_databases_search"](query="foreign exchange rates")
db = dbs.raw.iloc[0]["db"] # e.g. "FM08"
# step 2: find a series within it
hits = CONNECTORS["boj_series_search"](query="US dollar spot", db=db)
code = hits.raw.iloc[0]["code"] # e.g. "FXERD01"
# fetch observations
result = CONNECTORS["boj_fetch"](db=db, code=code, start_date="202401")
print(result.raw.head())
For multi-plugin composition (autoloads everything installed):
from parsimony import discover
connectors = discover.load_all()
Catalog building
scripts/build_catalog.py builds the multi-bundle catalog from the live
metadata and saves/pushes snapshots:
uv run python packages/boj/scripts/build_catalog.py \
--catalog all --save-root file:///tmp/parsimony-catalogs/boj --push-root hf://parsimony-dev/boj
Provider
- Homepage: https://www.boj.or.jp
- API manual: https://www.stat-search.boj.or.jp/info/api_manual_en.pdf
- Terms: https://www.stat-search.boj.or.jp/info/api_notice_en.pdf — public reuse with attribution to the Bank of Japan. This connector and its catalog are a derived index of series identifiers and titles.
License
See LICENSE.
Metadata
Release files for parsimony-boj 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| parsimony_boj-0.0.2.tar.gz | 24.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parsimony_boj-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.8 kB
Release files / parsimony_boj-0.0.2.tar.gz
| Download URL | parsimony_boj-0.0.2.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f84c603159805794b9514c4dbdb7458cfda8a5b61bbce5a1596497c9283ebc52
|
|
BLAKE2b-256 checksum How to use checksums |
3e799f5f7ec4a31976117846aaab2d43297e9a682344d8cee72b28def5ec17c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / parsimony_boj-0.0.2-py3-none-any.whl
| Download URL | parsimony_boj-0.0.2-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24d958aa99361828473f629088d63d91f9720319a517e5d8e582c9d3d8e75ef5
|
|
BLAKE2b-256 checksum How to use checksums |
81bc39d87e211ae35b481d0315f79b4c58407de840c13af1c834b6714b1f633a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logSecurity for parsimony-boj 0.0.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for parsimony_boj-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logA 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.