Skip to main content

📄 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

Metadata

Release files for BacenAPI 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BacenAPI 0.3.0
File Size Uploaded Provenance
bacenapi-0.3.0.tar.gz 181.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for BacenAPI 0.3.0
File Interpreter ABI Platform
bacenapi-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 375.5 kB

Release files / bacenapi-0.3.0.tar.gz

Download URL bacenapi-0.3.0.tar.gz
Size 181.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8a6e9f3c3a04b517de852504e8d9bd1116e81fc477d68ae2c54041a5be36e5b0
BLAKE2b-256 checksum
How to use checksums
61cd2ca3e10de287aa6b89e72826924516ac03bc20f060bf5ccd00f785eeec10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / bacenapi-0.3.0-py3-none-any.whl

Download URL bacenapi-0.3.0-py3-none-any.whl
Size 194.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b24fc9032143ae6946e9268be1afeaad24ff20aa86e611b6e0ad4cfcf5ee3cb4
BLAKE2b-256 checksum
How to use checksums
c4f843f654f4e6844a6cef65e10dc0e7e64519ea14347bbc0870196cd03351ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for BacenAPI 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page