--- id: python-bcb version: "0.4.0" license: unclear license_treatment: unclear maintenance: active --- # python-bcb License: unclear · Maintenance: active · Downloads: 110.4K/mo ## What it is and what it does python-bcb is a Python wrapper for the Brazilian Central Bank's open data APIs, providing structured access to economic and financial datasets. It abstracts three main data sources: SGS (time-series economic indicators like interest rates and inflation), a currency converter for daily exchange rates, and OData endpoints for market expectations, interest rates, real estate financing, and financial institution data. The package handles HTTP requests via httpx with connection pooling, parses responses into pandas DataFrames, and supports both synchronous and asynchronous retrieval. It includes built-in retry logic via tenacity, caches metadata where appropriate, and raises specific exceptions for common failure modes (rate limits, invalid series codes, missing currencies). Typical use is fetching historical economic time series for analysis, but it also supports ad-hoc queries with SQL-like filtering on OData endpoints. Use it for: - Fetch historical Selic or IPCA rates for inflation and interest rate analysis. - Retrieve daily USD/BRL exchange rates with buy/sell spreads for currency trading or financial reporting. - Query market consensus forecasts from the FOCUS bulletin for economic scenario planning. - Build dashboards or reports aggregating multiple BCB data sources concurrently with async methods. - Access real estate financing data and financial institution balance sheets for regulatory or research analysis. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Structured Python interface to fetch Brazilian Central Bank open data APIs, including time series, exchange rates, market expectations, and financial institution information. Yes, if you need Brazilian Central Bank data. The package is actively maintained, has low install friction, and provides a clean interface to otherwise fragmented APIs. License treatment is unclear, so verify terms before use in proprietary projects. No known vulnerabilities. Requires Python 3.10+. ## Install pip install python-bcb uv add python-bcb poetry add python-bcb ## Installing python-bcb Before you install: Low install friction with a pure-wheel distribution. Active maintenance with a release 60 days ago. Requires Python 3.10 or later. Quickstart: pip install python-bcb from bcb import sgs df = sgs.get(1, start="2023-01-01", end="2024-12-31") Requires Python 3.10 or later. Verify before relying: - License classification is unclear in the fact sheet; verify actual license terms before use in proprietary or GPL-incompatible projects. - Rate limiting behavior and retry strategy details are not specified; confirm handling for production workloads. - Async API stability and connection pooling behavior under sustained load are not documented in the fact sheet. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 110.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags brazilian central bank data api, bcb exchange rates python, economic indicators time series, brazil financial data access, odata api wrapper python, financial-data, brazil, odata [View on SkillFed](https://skillfed.io/packages/python-bcb) · [View on PyPI](https://pypi.org/project/python-bcb/)