{"id":45930,"library":"python-bcb","title":"python-bcb","description":"Python wrapper for the Brazilian Central Bank (BCB) API. Provides access to economic indicators, exchange rates, and time series data. Latest version: 0.3.6. Release cadence: infrequent, community-maintained.","status":"active","version":"0.3.6","language":"python","source_language":"en","source_url":"https://github.com/lvgalvao/python-bcb","tags":["brazilian central bank","economic indicators","currency","time series"],"install":[{"cmd":"pip install python-bcb","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"HTTP requests to BCB API","package":"requests","optional":false},{"reason":"Data manipulation and time series","package":"pandas","optional":true}],"imports":[{"wrong":"from bcb import BCB","symbol":"BCBAPIError","correct":"from bcb import BCBAPIError"},{"wrong":"from bcb import BCB","symbol":"Expectativas","correct":"from bcb import Expectativas"},{"wrong":"from bcb import BCB","symbol":"PTAX","correct":"from bcb import PTAX"}],"quickstart":{"code":"from bcb import BCB\n\nbcb = BCB()\n# Fetch USD exchange rate for a date\ndata = bcb.get('USD', start_date='2023-01-01')\nprint(data.head())","lang":"python","description":"Instantiate BCB and fetch exchange rate data."},"warnings":[{"fix":"Replace `currency` with `code` in all BCB.get() calls.","message":"In version 0.3.0, the argument 'currency' was renamed to 'code' in the `get` method. Existing code using `currency=` will fail.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Ensure pandas is installed: `pip install pandas`. Explicitly check import.","message":"The library returns data in pandas DataFrame format by default. If pandas is not installed, the library may silently fallback to dict/list types, causing attribute errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `bcb.codes()` instead of `bcb.get_currency_codes()`.","message":"The method `bcb.get_currency_codes()` is deprecated in favor of `bcb.codes()`. The old method may be removed in future versions.","severity":"deprecated","affected_versions":">=0.3.0"}],"env_vars":null,"search_vec":"'0.3.6':26 'access':14 'api':12 'bank':10,35 'bcb':3,11 'brazilian':8,33 'cadenc':28 'central':9,34 'communiti':31 'community-maintain':30 'currenc':38 'data':23 'econom':16,36 'exchang':18 'indic':17,37 'infrequ':29 'latest':24 'maintain':32 'provid':13 'python':2,4 'python-bcb':1 'rate':19 'releas':27 'seri':22,40 'time':21,39 'version':25 'wrapper':5","created_at":"2026-06-07T12:57:26.056233+00:00","updated_at":"2026-06-07T12:57:26.056233+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["finance"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}