Releases: TeodoroRodrigo/bcbpy
Releases · TeodoroRodrigo/bcbpy
v2.0.0
Changelog
[v2.0.0] - Renamed to bcbpy
Changed (breaking)
- Project renamed from
bcb-sgstobcbpy. This is a breaking change for imports and installation:- PyPI distribution:
pip install bcb-sgs→pip install bcbpy - Python import:
from bcb_sgs import ...→from bcbpy import ... - GitHub repository:
TeodoroRodrigo/bcb-sgs→TeodoroRodrigo/bcbpy
- PyPI distribution:
- Updated all documentation, examples, project URLs, and GitHub Actions environment targets to reflect the new name
Migration
# old
from bcb_sgs import fetch_series, INTEREST_RATES
# new
from bcbpy import fetch_series, INTEREST_RATESFull Changelog: v1.1.1...v2.0.0
v1.0.0 — Initial Release
bcb_sgs v1.0.0
Full Python client for the BCB SGS (Sistema Gerenciador de Series Temporais) API from the Banco Central do Brasil.
Highlights
- 115 curated series codes organized in 14 categories: Exchange Rates, Interest Rates (Selic, CDI, TR), Inflation (IPCA, IGP-M, INPC), GDP, Employment, Industrial Production, Financial Markets, Savings, Confidence, Economic Activity, Basic Basket, and more
- 5 client functions:
fetch_series,fetch_last,fetch_multiple,list_codes,search_codes - Flexible date handling — accepts both
YYYY-MM-DDandDD/MM/YYYY, with 10-year range validation - Error handling —
SGSError,SGSRateLimitError,SGSEmptyResponseError - 50 tests — 43 unit tests (mocked) + 7 integration tests (live API)
Quick Start
pip install -r requirements.txtfrom bcb_sgs import fetch_series, fetch_last, INTEREST_RATES, EXCHANGE_RATES
# Last 10 CDI daily rates
cdi = fetch_last(INTEREST_RATES["CDI_DAILY"], n=10)
# USD/BRL for 2024
usd = fetch_series(EXCHANGE_RATES["USD_SALE_DAILY"], start_date="2024-01-01", end_date="2024-12-31")See README.md for full documentation and CHANGELOG.md for details.