bojdata


Namebojdata JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryComprehensive Python package for accessing all Bank of Japan statistical data
upload_time2025-07-25 06:34:15
maintainerNone
docs_urlNone
authorCaymanDev
requires_python>=3.9
licenseNone
keywords boj bank-of-japan economics finance data statistics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bojdata

A comprehensive Python package for accessing ALL Bank of Japan (BOJ) statistical data.

## Overview

`bojdata` provides a complete interface to download and work with ALL data from the Bank of Japan's Time-Series Data Search portal. It handles the complexities of navigating the BOJ website, bulk downloading, and data processing to give you access to the entire BOJ statistical database.

## Features

### Core Features
- Download individual time series by code
- Search for available data series with enhanced parameters
- Automatic data cleaning and formatting
- Date range filtering
- Frequency conversion (daily, monthly, quarterly, yearly)
- Support for multiple series download

### FRED-Compatible Features (NEW)
- **Data Transformations**: All 9 FRED units (percent change, YoY, log, etc.)
- **FRED API Wrapper**: Familiar API for users migrating from FRED
- **Enhanced Search**: Full-text and series ID search with pagination and filters
- **Standardized Errors**: FRED-style error codes and messages
- **Multiple Output Formats**: Pandas DataFrames or FRED-style JSON
- **Batch Operations**: Parallel downloads for multiple series
- **Release Calendar**: Track when data series are updated
- **Series Metadata**: Detailed information about each series
- **Tag System**: Search and organize series by tags
- **Aggregation Methods**: Choose how to aggregate data (avg, sum, eop)

### Advanced Features
- **Bulk Download**: Download ALL available BOJ data at once
- **Comprehensive Search**: Search across all 13 data categories
- **Series Discovery**: Automatically discover all available series codes
- **Unified Database**: Build a searchable database of all BOJ data
- **Command-Line Interface**: Easy CLI access to all functionality
- **Category Navigation**: Browse data by category and subcategory
- **Flat File Support**: Download and process BOJ's flat file archives

## Installation

```bash
pip install bojdata
```

### Development Installation

```bash
git clone https://github.com/caymandev/bojdata.git
cd bojdata
pip install -e .[dev]
```

## Quick Start

### Basic Usage

```python
import bojdata

# Download a single series
df = bojdata.read_boj(series="BS01'MABJMTA")

# Download multiple series
df = bojdata.read_boj(series=["IR01", "FM01"])

# Search for series
results = bojdata.search_series("interest rate")

# Download with data transformations (NEW)
df_pct_change = bojdata.read_boj(series="BS01'MABJMTA", units='pch')  # Percent change
df_yoy = bojdata.read_boj(series="CPI", units='pc1')  # Year-over-year % change
```

### FRED-Compatible API (NEW)

```python
from bojdata import BOJDataAPI

api = BOJDataAPI()

# Get series metadata (like FRED)
metadata = api.get_series("BS01'MABJMTA")
print(f"Title: {metadata['title']}")
print(f"Frequency: {metadata['frequency']}")

# Get observations with transformations
data = api.get_observations(
    "BS01'MABJMTA",
    start_date="2020-01-01",
    end_date="2023-12-31",
    units='pc1',  # Year-over-year percent change
    frequency='Q'  # Convert to quarterly
)

# Enhanced search with FRED parameters
results = api.search_series(
    "interest rate",
    search_type='full_text',
    limit=20,
    order_by='relevance'
)

# Get FRED-style JSON output
json_data = api.get_observations("IR01", output_type='dict')
```

### Advanced Usage - Access ALL BOJ Data

```python
from bojdata import BOJBulkDownloader, BOJComprehensiveSearch

# Download ALL available data
downloader = BOJBulkDownloader("./boj_data")
downloader.download_all_flat_files()
downloader.extract_and_process_all()

# Build a unified database
db_path = downloader.build_unified_database(output_format="sqlite")

# Search across ALL categories
searcher = BOJComprehensiveSearch()
results = searcher.search_all_categories("inflation")

# Discover all available series
catalog = searcher.build_series_catalog()
```

### Command-Line Interface

```bash
# Download specific series
bojdata download IR01 FM01 --output ./data

# Bulk download everything
bojdata bulk --build-db --db-format sqlite

# Search across all data
bojdata search "exchange rate" --limit 50

# Build complete series catalog
bojdata catalog --output all_series.csv
```

## Examples

### Download Monetary Base Data

```python
import bojdata

# Download monetary base average amounts outstanding
monetary_base = bojdata.read_boj(series="BS01'MABJMTA")
print(monetary_base.head())
```

### Download Multiple Interest Rate Series

```python
# Download overnight call rate and other interest rates
rates = bojdata.read_boj(series=["IR01", "IR02", "IR03"])
print(rates.columns)
```

### Convert Frequency

```python
# Download daily data and convert to monthly
daily_data = bojdata.read_boj(series="FM01", frequency="M")
```

### Data Transformations (NEW)

```python
# Available transformation units (FRED-compatible):
# 'lin' - Levels (no transformation) [default]
# 'chg' - Change from previous period
# 'ch1' - Change from year ago
# 'pch' - Percent change
# 'pc1' - Percent change from year ago
# 'pca' - Compounded annual rate
# 'cch' - Continuously compounded change
# 'cca' - Continuously compounded annual rate
# 'log' - Natural log

# Examples of transformations
df_levels = bojdata.read_boj("BS01'MABJMTA", units='lin')     # Original values
df_pct_chg = bojdata.read_boj("BS01'MABJMTA", units='pch')    # Period % change
df_yoy_chg = bojdata.read_boj("BS01'MABJMTA", units='pc1')    # YoY % change
df_log = bojdata.read_boj("BS01'MABJMTA", units='log')        # Natural log

# Combine with frequency conversion
df_quarterly_yoy = bojdata.read_boj(
    series="FM01",
    frequency="Q",     # Convert to quarterly
    units='pc1'        # Then calculate YoY change
)

# Different aggregation methods
df_sum = bojdata.read_boj("FLOW_SERIES", frequency="Q", aggregation_method="sum")
df_eop = bojdata.read_boj("STOCK_SERIES", frequency="Q", aggregation_method="eop")
```

### Batch Operations (NEW)

```python
from bojdata import read_boj_batch

# Download multiple series in parallel
series_list = ['IR01', 'IR02', 'IR03', 'FM01', 'FM02', 'BS01', 'MD01']
df = read_boj_batch(series_list, max_workers=5, units='pch')

# Using the API
api = BOJDataAPI()
df = api.get_observations_multi(
    ['IR01', 'FM01', 'BS01'],
    start_date='2020-01-01',
    units='pc1'
)
```

### Release Calendar (NEW)

```python
# Get release calendar
releases = api.get_releases(2024)
print(releases[['date', 'series_name', 'frequency']])

# Find when TANKAN is released
tankan_dates = api.get_release_dates('TANKAN')

# Export to calendar
from bojdata import BOJReleaseCalendar
calendar = BOJReleaseCalendar()
calendar.to_ical(2024, 'boj_releases.ics')
```

### Series Metadata & Tags (NEW)

```python
# Get detailed metadata
meta = api.get_series("BS01'MABJMTA")
print(f"Description: {meta['notes']}")
print(f"Units: {meta['units']}")
print(f"Tags: {meta['tags']}")
print(f"Related series: {meta['related_series']}")

# Search by tags
inflation_series = api.search_by_tag('inflation')
monthly_series = api.search_by_tag('monthly')

# Get all tags for a series
tags = api.get_series_tags("PR01'IUQCP001")
```

## For FRED Users

If you're familiar with the FRED API, bojdata now provides a compatible interface:

### Migration Examples

```python
# FRED Python                          # BOJData Equivalent
from fredapi import Fred               from bojdata import BOJDataAPI
fred = Fred(api_key='...')            api = BOJDataAPI()

# Get series info
fred.get_series_info('DGS10')        api.get_series('FM08')

# Get observations
fred.get_series('DGS10')              api.get_observations('FM08')

# With transformations
fred.get_series('DGS10',              api.get_observations('FM08',
    units='pch')                          units='pch')

# Search
fred.search('text:interest rate')     api.search_series('interest rate')
```

### Key Differences

| Feature | FRED | BOJData |
|---------|------|---------|
| API Key | Required | Not needed |
| Data Source | Multiple sources | Bank of Japan only |
| Geographic Scope | Mainly US data | Japanese data |
| Vintage Data | Available | Not available |
| Rate Limits | Yes | No (but be respectful) |

## Available Data

### Data Categories (13 Total)

1. **Interest Rates on Deposits and Loans**
   - Deposit rates, loan rates, interest rate spreads
   
2. **Financial Markets**
   - Stock indices, exchange rates, bond yields, money market rates
   
3. **Payment and Settlement**
   - BOJ-NET, Zengin System, electronic payments
   
4. **Money and Deposits**
   - Monetary base, money stock (M1, M2, M3), deposit aggregates
   
5. **Loans**
   - Bank lending by sector, loan growth, credit conditions
   
6. **Balance Sheets**
   - BOJ accounts, financial institution balance sheets
   
7. **Flow of Funds**
   - Sectoral accounts, financial flows, asset holdings
   
8. **Other Bank of Japan Statistics**
   - Research series, special surveys, historical data
   
9. **TANKAN (Business Survey)**
   - Business conditions, economic outlook, capital expenditure
   
10. **Prices**
    - CPI, PPI, CGPI, service price indices
    
11. **Public Finance**
    - Government debt, fiscal balance, bond issuance
    
12. **Balance of Payments**
    - Current account, trade statistics, international investment
    
13. **Others**
    - Regional statistics, miscellaneous indicators

### Flat File Downloads

Pre-packaged data files updated regularly:
- `prices_m_en.zip` - Monthly price data
- `fof_q_en.zip` - Quarterly flow of funds
- `tankan_q_en.zip` - Quarterly TANKAN survey
- `bp_m_en.zip` - Monthly balance of payments
- `bis_q_en.zip` - Quarterly BIS statistics

## Error Handling

The package provides FRED-compatible exceptions with HTTP error codes:

```python
from bojdata.exceptions import (
    BOJSeriesNotFoundError,
    InvalidParameterError,
    DataUnavailableError
)

# Series not found (404)
try:
    df = bojdata.read_boj(series="INVALID_CODE")
except BOJSeriesNotFoundError as e:
    print(f"Error: {e}")
    print(f"HTTP Code: {e.code}")  # 404

# Invalid parameter (400)
try:
    df = bojdata.read_boj(series="IR01", units="invalid_unit")
except InvalidParameterError as e:
    print(f"Error: {e}")
    print(f"Invalid parameter: {e.parameter_name}")
    print(f"Valid options: {e.valid_values}")

# Get error as dictionary (for API responses)
try:
    api = BOJDataAPI()
    api.get_series("INVALID")
except BOJSeriesNotFoundError as e:
    error_dict = e.to_dict()  # {'error_code': 404, 'error_message': '...'}
```

## Requirements

- Python 3.9+
- pandas
- requests
- beautifulsoup4
- numpy
- lxml

## License

MIT License - see LICENSE file for details.

## Development

### Running Tests

```bash
# Run tests with pytest
pytest

# Run tests with coverage
pytest --cov=bojdata

# Run tests for all Python versions
tox
```

### Code Quality

```bash
# Format code
black bojdata tests

# Sort imports
isort bojdata tests

# Lint code
flake8 bojdata tests

# Type check
mypy bojdata
```

### Releasing New Versions

This project uses `bump2version` and GitHub Actions for versioning and releases:

1. Update version:
   ```bash
   bump2version patch  # for bug fixes
   bump2version minor  # for new features
   bump2version major  # for breaking changes
   ```

2. Push to GitHub:
   ```bash
   git push origin main
   git push --tags
   ```

3. GitHub Actions will automatically:
   - Run tests on multiple Python versions
   - Publish to Test PyPI
   - Publish to PyPI (on tag push)
   - Create a GitHub release

## Contributing

Contributions are welcome! Please:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

MIT License - see LICENSE file for details.

## Disclaimer

This package is not affiliated with or endorsed by the Bank of Japan. Please refer to the BOJ website for official data and terms of use.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bojdata",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "boj, bank-of-japan, economics, finance, data, statistics",
    "author": "CaymanDev",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/1e/92/97dbf60c562e92ca98ee972da06d0fb92f3e9e8e929955e72d451ac90f45/bojdata-0.0.1.tar.gz",
    "platform": null,
    "description": "# bojdata\n\nA comprehensive Python package for accessing ALL Bank of Japan (BOJ) statistical data.\n\n## Overview\n\n`bojdata` provides a complete interface to download and work with ALL data from the Bank of Japan's Time-Series Data Search portal. It handles the complexities of navigating the BOJ website, bulk downloading, and data processing to give you access to the entire BOJ statistical database.\n\n## Features\n\n### Core Features\n- Download individual time series by code\n- Search for available data series with enhanced parameters\n- Automatic data cleaning and formatting\n- Date range filtering\n- Frequency conversion (daily, monthly, quarterly, yearly)\n- Support for multiple series download\n\n### FRED-Compatible Features (NEW)\n- **Data Transformations**: All 9 FRED units (percent change, YoY, log, etc.)\n- **FRED API Wrapper**: Familiar API for users migrating from FRED\n- **Enhanced Search**: Full-text and series ID search with pagination and filters\n- **Standardized Errors**: FRED-style error codes and messages\n- **Multiple Output Formats**: Pandas DataFrames or FRED-style JSON\n- **Batch Operations**: Parallel downloads for multiple series\n- **Release Calendar**: Track when data series are updated\n- **Series Metadata**: Detailed information about each series\n- **Tag System**: Search and organize series by tags\n- **Aggregation Methods**: Choose how to aggregate data (avg, sum, eop)\n\n### Advanced Features\n- **Bulk Download**: Download ALL available BOJ data at once\n- **Comprehensive Search**: Search across all 13 data categories\n- **Series Discovery**: Automatically discover all available series codes\n- **Unified Database**: Build a searchable database of all BOJ data\n- **Command-Line Interface**: Easy CLI access to all functionality\n- **Category Navigation**: Browse data by category and subcategory\n- **Flat File Support**: Download and process BOJ's flat file archives\n\n## Installation\n\n```bash\npip install bojdata\n```\n\n### Development Installation\n\n```bash\ngit clone https://github.com/caymandev/bojdata.git\ncd bojdata\npip install -e .[dev]\n```\n\n## Quick Start\n\n### Basic Usage\n\n```python\nimport bojdata\n\n# Download a single series\ndf = bojdata.read_boj(series=\"BS01'MABJMTA\")\n\n# Download multiple series\ndf = bojdata.read_boj(series=[\"IR01\", \"FM01\"])\n\n# Search for series\nresults = bojdata.search_series(\"interest rate\")\n\n# Download with data transformations (NEW)\ndf_pct_change = bojdata.read_boj(series=\"BS01'MABJMTA\", units='pch')  # Percent change\ndf_yoy = bojdata.read_boj(series=\"CPI\", units='pc1')  # Year-over-year % change\n```\n\n### FRED-Compatible API (NEW)\n\n```python\nfrom bojdata import BOJDataAPI\n\napi = BOJDataAPI()\n\n# Get series metadata (like FRED)\nmetadata = api.get_series(\"BS01'MABJMTA\")\nprint(f\"Title: {metadata['title']}\")\nprint(f\"Frequency: {metadata['frequency']}\")\n\n# Get observations with transformations\ndata = api.get_observations(\n    \"BS01'MABJMTA\",\n    start_date=\"2020-01-01\",\n    end_date=\"2023-12-31\",\n    units='pc1',  # Year-over-year percent change\n    frequency='Q'  # Convert to quarterly\n)\n\n# Enhanced search with FRED parameters\nresults = api.search_series(\n    \"interest rate\",\n    search_type='full_text',\n    limit=20,\n    order_by='relevance'\n)\n\n# Get FRED-style JSON output\njson_data = api.get_observations(\"IR01\", output_type='dict')\n```\n\n### Advanced Usage - Access ALL BOJ Data\n\n```python\nfrom bojdata import BOJBulkDownloader, BOJComprehensiveSearch\n\n# Download ALL available data\ndownloader = BOJBulkDownloader(\"./boj_data\")\ndownloader.download_all_flat_files()\ndownloader.extract_and_process_all()\n\n# Build a unified database\ndb_path = downloader.build_unified_database(output_format=\"sqlite\")\n\n# Search across ALL categories\nsearcher = BOJComprehensiveSearch()\nresults = searcher.search_all_categories(\"inflation\")\n\n# Discover all available series\ncatalog = searcher.build_series_catalog()\n```\n\n### Command-Line Interface\n\n```bash\n# Download specific series\nbojdata download IR01 FM01 --output ./data\n\n# Bulk download everything\nbojdata bulk --build-db --db-format sqlite\n\n# Search across all data\nbojdata search \"exchange rate\" --limit 50\n\n# Build complete series catalog\nbojdata catalog --output all_series.csv\n```\n\n## Examples\n\n### Download Monetary Base Data\n\n```python\nimport bojdata\n\n# Download monetary base average amounts outstanding\nmonetary_base = bojdata.read_boj(series=\"BS01'MABJMTA\")\nprint(monetary_base.head())\n```\n\n### Download Multiple Interest Rate Series\n\n```python\n# Download overnight call rate and other interest rates\nrates = bojdata.read_boj(series=[\"IR01\", \"IR02\", \"IR03\"])\nprint(rates.columns)\n```\n\n### Convert Frequency\n\n```python\n# Download daily data and convert to monthly\ndaily_data = bojdata.read_boj(series=\"FM01\", frequency=\"M\")\n```\n\n### Data Transformations (NEW)\n\n```python\n# Available transformation units (FRED-compatible):\n# 'lin' - Levels (no transformation) [default]\n# 'chg' - Change from previous period\n# 'ch1' - Change from year ago\n# 'pch' - Percent change\n# 'pc1' - Percent change from year ago\n# 'pca' - Compounded annual rate\n# 'cch' - Continuously compounded change\n# 'cca' - Continuously compounded annual rate\n# 'log' - Natural log\n\n# Examples of transformations\ndf_levels = bojdata.read_boj(\"BS01'MABJMTA\", units='lin')     # Original values\ndf_pct_chg = bojdata.read_boj(\"BS01'MABJMTA\", units='pch')    # Period % change\ndf_yoy_chg = bojdata.read_boj(\"BS01'MABJMTA\", units='pc1')    # YoY % change\ndf_log = bojdata.read_boj(\"BS01'MABJMTA\", units='log')        # Natural log\n\n# Combine with frequency conversion\ndf_quarterly_yoy = bojdata.read_boj(\n    series=\"FM01\",\n    frequency=\"Q\",     # Convert to quarterly\n    units='pc1'        # Then calculate YoY change\n)\n\n# Different aggregation methods\ndf_sum = bojdata.read_boj(\"FLOW_SERIES\", frequency=\"Q\", aggregation_method=\"sum\")\ndf_eop = bojdata.read_boj(\"STOCK_SERIES\", frequency=\"Q\", aggregation_method=\"eop\")\n```\n\n### Batch Operations (NEW)\n\n```python\nfrom bojdata import read_boj_batch\n\n# Download multiple series in parallel\nseries_list = ['IR01', 'IR02', 'IR03', 'FM01', 'FM02', 'BS01', 'MD01']\ndf = read_boj_batch(series_list, max_workers=5, units='pch')\n\n# Using the API\napi = BOJDataAPI()\ndf = api.get_observations_multi(\n    ['IR01', 'FM01', 'BS01'],\n    start_date='2020-01-01',\n    units='pc1'\n)\n```\n\n### Release Calendar (NEW)\n\n```python\n# Get release calendar\nreleases = api.get_releases(2024)\nprint(releases[['date', 'series_name', 'frequency']])\n\n# Find when TANKAN is released\ntankan_dates = api.get_release_dates('TANKAN')\n\n# Export to calendar\nfrom bojdata import BOJReleaseCalendar\ncalendar = BOJReleaseCalendar()\ncalendar.to_ical(2024, 'boj_releases.ics')\n```\n\n### Series Metadata & Tags (NEW)\n\n```python\n# Get detailed metadata\nmeta = api.get_series(\"BS01'MABJMTA\")\nprint(f\"Description: {meta['notes']}\")\nprint(f\"Units: {meta['units']}\")\nprint(f\"Tags: {meta['tags']}\")\nprint(f\"Related series: {meta['related_series']}\")\n\n# Search by tags\ninflation_series = api.search_by_tag('inflation')\nmonthly_series = api.search_by_tag('monthly')\n\n# Get all tags for a series\ntags = api.get_series_tags(\"PR01'IUQCP001\")\n```\n\n## For FRED Users\n\nIf you're familiar with the FRED API, bojdata now provides a compatible interface:\n\n### Migration Examples\n\n```python\n# FRED Python                          # BOJData Equivalent\nfrom fredapi import Fred               from bojdata import BOJDataAPI\nfred = Fred(api_key='...')            api = BOJDataAPI()\n\n# Get series info\nfred.get_series_info('DGS10')        api.get_series('FM08')\n\n# Get observations\nfred.get_series('DGS10')              api.get_observations('FM08')\n\n# With transformations\nfred.get_series('DGS10',              api.get_observations('FM08',\n    units='pch')                          units='pch')\n\n# Search\nfred.search('text:interest rate')     api.search_series('interest rate')\n```\n\n### Key Differences\n\n| Feature | FRED | BOJData |\n|---------|------|---------|\n| API Key | Required | Not needed |\n| Data Source | Multiple sources | Bank of Japan only |\n| Geographic Scope | Mainly US data | Japanese data |\n| Vintage Data | Available | Not available |\n| Rate Limits | Yes | No (but be respectful) |\n\n## Available Data\n\n### Data Categories (13 Total)\n\n1. **Interest Rates on Deposits and Loans**\n   - Deposit rates, loan rates, interest rate spreads\n   \n2. **Financial Markets**\n   - Stock indices, exchange rates, bond yields, money market rates\n   \n3. **Payment and Settlement**\n   - BOJ-NET, Zengin System, electronic payments\n   \n4. **Money and Deposits**\n   - Monetary base, money stock (M1, M2, M3), deposit aggregates\n   \n5. **Loans**\n   - Bank lending by sector, loan growth, credit conditions\n   \n6. **Balance Sheets**\n   - BOJ accounts, financial institution balance sheets\n   \n7. **Flow of Funds**\n   - Sectoral accounts, financial flows, asset holdings\n   \n8. **Other Bank of Japan Statistics**\n   - Research series, special surveys, historical data\n   \n9. **TANKAN (Business Survey)**\n   - Business conditions, economic outlook, capital expenditure\n   \n10. **Prices**\n    - CPI, PPI, CGPI, service price indices\n    \n11. **Public Finance**\n    - Government debt, fiscal balance, bond issuance\n    \n12. **Balance of Payments**\n    - Current account, trade statistics, international investment\n    \n13. **Others**\n    - Regional statistics, miscellaneous indicators\n\n### Flat File Downloads\n\nPre-packaged data files updated regularly:\n- `prices_m_en.zip` - Monthly price data\n- `fof_q_en.zip` - Quarterly flow of funds\n- `tankan_q_en.zip` - Quarterly TANKAN survey\n- `bp_m_en.zip` - Monthly balance of payments\n- `bis_q_en.zip` - Quarterly BIS statistics\n\n## Error Handling\n\nThe package provides FRED-compatible exceptions with HTTP error codes:\n\n```python\nfrom bojdata.exceptions import (\n    BOJSeriesNotFoundError,\n    InvalidParameterError,\n    DataUnavailableError\n)\n\n# Series not found (404)\ntry:\n    df = bojdata.read_boj(series=\"INVALID_CODE\")\nexcept BOJSeriesNotFoundError as e:\n    print(f\"Error: {e}\")\n    print(f\"HTTP Code: {e.code}\")  # 404\n\n# Invalid parameter (400)\ntry:\n    df = bojdata.read_boj(series=\"IR01\", units=\"invalid_unit\")\nexcept InvalidParameterError as e:\n    print(f\"Error: {e}\")\n    print(f\"Invalid parameter: {e.parameter_name}\")\n    print(f\"Valid options: {e.valid_values}\")\n\n# Get error as dictionary (for API responses)\ntry:\n    api = BOJDataAPI()\n    api.get_series(\"INVALID\")\nexcept BOJSeriesNotFoundError as e:\n    error_dict = e.to_dict()  # {'error_code': 404, 'error_message': '...'}\n```\n\n## Requirements\n\n- Python 3.9+\n- pandas\n- requests\n- beautifulsoup4\n- numpy\n- lxml\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Development\n\n### Running Tests\n\n```bash\n# Run tests with pytest\npytest\n\n# Run tests with coverage\npytest --cov=bojdata\n\n# Run tests for all Python versions\ntox\n```\n\n### Code Quality\n\n```bash\n# Format code\nblack bojdata tests\n\n# Sort imports\nisort bojdata tests\n\n# Lint code\nflake8 bojdata tests\n\n# Type check\nmypy bojdata\n```\n\n### Releasing New Versions\n\nThis project uses `bump2version` and GitHub Actions for versioning and releases:\n\n1. Update version:\n   ```bash\n   bump2version patch  # for bug fixes\n   bump2version minor  # for new features\n   bump2version major  # for breaking changes\n   ```\n\n2. Push to GitHub:\n   ```bash\n   git push origin main\n   git push --tags\n   ```\n\n3. GitHub Actions will automatically:\n   - Run tests on multiple Python versions\n   - Publish to Test PyPI\n   - Publish to PyPI (on tag push)\n   - Create a GitHub release\n\n## Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Disclaimer\n\nThis package is not affiliated with or endorsed by the Bank of Japan. Please refer to the BOJ website for official data and terms of use.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Comprehensive Python package for accessing all Bank of Japan statistical data",
    "version": "0.0.1",
    "project_urls": {
        "Documentation": "https://bojdata.readthedocs.io",
        "Homepage": "https://github.com/caymandev/bojdata",
        "Issues": "https://github.com/caymandev/bojdata/issues",
        "Repository": "https://github.com/caymandev/bojdata"
    },
    "split_keywords": [
        "boj",
        " bank-of-japan",
        " economics",
        " finance",
        " data",
        " statistics"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ba01967ec7508c2250ca2bcc3eb3b6e13297384ad7fa8b27046ec779b11b6c44",
                "md5": "bbe1bed3c3df79b9a44bb8bb6d77c72e",
                "sha256": "2b00525cf2972b8b28b9732217a2f5b7cfc2ac02d2c02e03b4864688e6d3025d"
            },
            "downloads": -1,
            "filename": "bojdata-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bbe1bed3c3df79b9a44bb8bb6d77c72e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 46088,
            "upload_time": "2025-07-25T06:34:13",
            "upload_time_iso_8601": "2025-07-25T06:34:13.901498Z",
            "url": "https://files.pythonhosted.org/packages/ba/01/967ec7508c2250ca2bcc3eb3b6e13297384ad7fa8b27046ec779b11b6c44/bojdata-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1e9297dbf60c562e92ca98ee972da06d0fb92f3e9e8e929955e72d451ac90f45",
                "md5": "001ee9c68aa3a899e2ea68145bd12b24",
                "sha256": "701f1ed39b2b5390d5fe6d7104ad98a923c264c377e9bd330ba67f8cfaaab25e"
            },
            "downloads": -1,
            "filename": "bojdata-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "001ee9c68aa3a899e2ea68145bd12b24",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 48920,
            "upload_time": "2025-07-25T06:34:15",
            "upload_time_iso_8601": "2025-07-25T06:34:15.637558Z",
            "url": "https://files.pythonhosted.org/packages/1e/92/97dbf60c562e92ca98ee972da06d0fb92f3e9e8e929955e72d451ac90f45/bojdata-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-25 06:34:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "caymandev",
    "github_project": "bojdata",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "bojdata"
}
        
Elapsed time: 0.81819s