Metadata-Version: 2.3
Name: sgs2
Version: 0.1.0
Summary: A pure Python interface for the Brazilian Central Bank's Time Series Management System (SGS) API
License: MIT
Author: Renan Moretto
Author-email: renan_morettopereira@hotmail.com
Requires-Python: >=3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Description-Content-Type: text/markdown

# SGS2

A pure Python interface for the Brazilian Central Bank's Time Series Management System (SGS) API.

## Installation

```bash
pip install sgs2
```

## Usage

### Quick Start

```python
import sgs2 as sgs

# Get a time series as a pandas DataFrame
sgs.dataframe(12)  # CDI (Brazilian Interbank Deposit Rate)

# Get data with a custom date range
sgs.dataframe(12, start='2020-01-01', end='2021-01-01')

# Get multiple series with custom column names
sgs.dataframe({433: 'ipca', 189: 'igpm'})

# Get a single series as a pandas Series
sgs.series(12)
sgs.series({12: 'cdi'})  # With custom name
```

#### `json()`

Fetch the raw JSON data from the API (to be implemented).

#### `metadata()`

Fetch metadata about a series (to be implemented).

#### `search()`

Fetch metadata about a series (to be implemented).

## Data Codes

Some common series codes:

- `12`: CDI (Brazilian Interbank Deposit Rate)
- `433`: IPCA
- `189`: IGP-M (General Market Price Index)

## License

MIT

