Skip to main content

pyboj

Beginner-friendly Python client for the Bank of Japan Time-Series Statistics API.

PyPI License: MIT Python 3.10+ Open In Colab

Built on top of boj-ts-api for advanced users who need direct API access.

Installation

pip install pyboj

Quick Start

from pyboj import BOJ, Currency, Frequency

boj = BOJ()

# Exchange rates — no magic strings
rates = boj.exchange_rates(
    currency=Currency.USD_JPY,
    frequency=Frequency.D,
    start_date="202401",
)
for r in rates:
    print(r.currency_pair, r.rate_type, r.values[:3])
    df = r.to_dataframe()  # pandas DataFrame

# Interest rates
rates = boj.interest_rates(frequency=Frequency.D)
for r in rates:
    print(r.rate_category, r.collateralization, r.tenor)

# TANKAN survey
from pyboj import TankanIndustry, TankanSize
results = boj.tankan(
    industry=TankanIndustry.MANUFACTURING,
    size=TankanSize.LARGE,
)

# Price indices
indices = boj.price_indices(start_date="202401")

# Balance of payments, Money/Deposits, Loans, and more
bop = boj.balance_of_payments()
money = boj.money_deposits()
loans = boj.loans()

See the full documentation for all 14 methods, filter enums, and domain wrapper properties.

License

MIT

Metadata

Release files for pyboj 0.3.0

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

Source distribution (sdist)

Source distribution for pyboj 0.3.0
File Size Uploaded Provenance
pyboj-0.3.0.tar.gz 36.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyboj 0.3.0
File Interpreter ABI Platform
pyboj-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 70.3 kB

Release files / pyboj-0.3.0.tar.gz

Download URL pyboj-0.3.0.tar.gz
Size 36.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3126323af521cfbad7e3d599019ec7bc8ae8035d41e6678527319c61b2e05a0c
BLAKE2b-256 checksum
How to use checksums
6cbe91d6db809d94c19e82c8c7f56a824308756176575f23d42eb8ab07a9637c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / pyboj-0.3.0-py3-none-any.whl

Download URL pyboj-0.3.0-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99b7863ee9391bc09e21ae7e5d1878b5487420dbf28517870b76febab5ea0010
BLAKE2b-256 checksum
How to use checksums
b27a5290636b6ac5d11ce6ccfc963103e5cfec15b1d310aacccaf940b51002f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Security for pyboj 0.3.0

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.

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