Beginner-friendly Python client for the Bank of Japan Time-Series Statistics API
Project description
pyboj
Beginner-friendly Python client for the Bank of Japan Time-Series Statistics API.
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
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 pyboj-0.1.0.tar.gz.
File metadata
- Download URL: pyboj-0.1.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0fd20cc724c0a7f856d3c98d024c842a032c38e99fc51f8c9fa610488ae2b37
|
|
| MD5 |
53669d79693af1f5775ea02aeb8a6ef1
|
|
| BLAKE2b-256 |
9743cc21783bc303214f587822b1b4249bd91c7917b3ff5f24ab4cbd3def13ca
|
File details
Details for the file pyboj-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyboj-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
922651803e1320afd8c7abdf9750297b045adfe10f7d80b43d00078ee5bda068
|
|
| MD5 |
009cb9fc710e9b2a0ab831b1d1bd6d86
|
|
| BLAKE2b-256 |
09b28082972fa6fcf8f012857e536e79e1838bc258380084d2db592298e3030e
|