Skip to main content

Package to access time series data from the Central Bank of Brazil via API

Project description

📄 README.md

# BacenAPI

**BacenAPI** is a Python package designed to simplify the access and manipulation of time 
series data from the Central Bank of Brazil (Banco Central do Brasil - BCB), using its 
public API (SGS - Sistema Gerenciador de Séries Temporais).

---

## 📦 Features

- 🔍 **Search series** using keywords in the metadata
- 🔗 **Generate URLs** for one or more time series from BCB's SGS API
- 📊 **Download and structure** the time series data into a unified `pandas.DataFrame`
- 📁 Supports integration with local metadata files in `.txt` or `.parquet` formats

---

## 🚀 Installation

```bash
pip install BacenAPI

Or, if you're developing locally:

git clone https://github.com/LissandroSousa/BacenAPI.py.git
cd BacenAPI
pip install -e .

🧩 Dependencies

  • pandas
  • requests

🛠️ Usage Example

from BacenAPI import bacen_search, bacen_url, bacen_series

# Search for time series by keyword
df_search = bacen_search("IPCA")
print(df_search)

# Get URLs for a specific set of series
urls = bacen_url(series=[433, 4440], start_date="01/01/2020", end_date="01/01/2024")

# Download the data and format as DataFrame
df = bacen_series(urls)
print(df.head())

📂 Project Structure

BacenAPI/
├── BacenAPI/
│   ├── __init__.py
│   ├── bacen_search.py
│   ├── bacen_url.py
│   ├── bacen_series.py
│   └── Date/
│       └── arquivo1.txt
├── setup.py
├── pyproject.toml
└── README.md


👥 Authors

  • Paulo Andre
  • Lissandro Costa de Sousa
  • Prof. Francisco Gildemir Ferreira da Silva (Supervisor)

📄 License

This project is licensed under the MIT License. See the LICENSE file for more details.


📫 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


🌐 Source and Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bacenapi-0.3.0.tar.gz (181.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bacenapi-0.3.0-py3-none-any.whl (194.2 kB view details)

Uploaded Python 3

File details

Details for the file bacenapi-0.3.0.tar.gz.

File metadata

  • Download URL: bacenapi-0.3.0.tar.gz
  • Upload date:
  • Size: 181.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for bacenapi-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8a6e9f3c3a04b517de852504e8d9bd1116e81fc477d68ae2c54041a5be36e5b0
MD5 acaa0142896b170bed8567a5ad859c7e
BLAKE2b-256 61cd2ca3e10de287aa6b89e72826924516ac03bc20f060bf5ccd00f785eeec10

See more details on using hashes here.

File details

Details for the file bacenapi-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: bacenapi-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 194.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for bacenapi-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b24fc9032143ae6946e9268be1afeaad24ff20aa86e611b6e0ad4cfcf5ee3cb4
MD5 2e95b77fd985ff38b91a7e1b97ba601b
BLAKE2b-256 c4f843f654f4e6844a6cef65e10dc0e7e64519ea14347bbc0870196cd03351ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page