Metadata-Version: 2.4
Name: chile-ine-sdk
Version: 0.1.0
Summary: Python SDK for the Chilean National Institute of Statistics (INE) APIs: Classifiers (CIUO/CAENES) & SIMEL.
License-Expression: MIT
License-File: LICENSE.md
Keywords: ine,chile,ciuo,caenes,simel,statistics,gobierno-de-chile,sdk
Author: Eli-ezer Reuven Ramirez Ruiz
Author-email: ramirez.ruiz.eliezer.reuven@gmail.com
Requires-Python: >=3.12
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Provides-Extra: dataframe
Provides-Extra: pandas
Provides-Extra: polars
Requires-Dist: httpx-retries (>=0.6.0,<0.7.0)
Requires-Dist: httpx[brotli,zstd] (>=0.28.1,<0.29.0)
Requires-Dist: pandas (>=2.2.0,<3.0.0) ; extra == "dataframe"
Requires-Dist: pandas (>=2.2.0,<3.0.0) ; extra == "pandas"
Requires-Dist: polars (>=1.0.0,<2.0.0) ; extra == "dataframe"
Requires-Dist: polars (>=1.0.0,<2.0.0) ; extra == "polars"
Requires-Dist: pydantic (>=2.10.0,<3.0.0)
Project-URL: Changelog, https://github.com/ezer-mackenzie/chile-ine-sdk/blob/main/CHANGELOG.md
Project-URL: Documentation, https://ezer-mackenzie.github.io/chile-ine-sdk/
Project-URL: Homepage, https://github.com/ezer-mackenzie/chile-ine-sdk
Project-URL: Issues, https://github.com/ezer-mackenzie/chile-ine-sdk/issues
Project-URL: Repository, https://github.com/ezer-mackenzie/chile-ine-sdk
Description-Content-Type: text/markdown

# Chile INE Python SDK (`chile_ine_sdk`)

[![PyPI version](https://img.shields.io/pypi/v/chile-ine-sdk.svg)](https://pypi.org/project/chile-ine-sdk/)
[![Python Versions](https://img.shields.io/pypi/pyversions/chile-ine-sdk.svg)](https://pypi.org/project/chile-ine-sdk/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A modern, type-safe, synchronous and asynchronous Python SDK for interacting with the web APIs of the Chilean National Institute of Statistics (**INE** - *Instituto Nacional de Estadísticas*).

This unified SDK provides access to both INE API services:
1. **Classifiers API (`rapps.ine.cl`)**: Machine Learning classification models for CIUO (Occupations) and CAENES (Economic Activities).
2. **SIMEL API (`simel.gob.cl`)**: Labor Market Information System statistics, indicators, dimensions, and time series data.

---

## Features

- ⚡ **Sync & Async Support**: Seamless HTTP execution powered by `httpx`.
- 🔒 **Strong Type Safety**: Full Pydantic v2 schemas and strict MyPy typing.
- 🔁 **Automatic Retries**: Built-in exponential backoff for resilient API calls.
- 📊 **DataFrame Support**: Export statistical series directly to Pandas or Polars.
- 🌐 **Multilingual Docs**: Complete English documentation with Spanish translation support.

---

## Installation

```bash
pip install chile-ine-sdk
```

Optional DataFrame support:
```bash
pip install "chile-ine-sdk[dataframe]"
```

---

## Quickstart

```python
from chile_ine_sdk import INEClient

# Initialize unified INE client
client = INEClient()

# 1. CIUO / CAENES Classification
prediction = client.classifiers.predict(
    text="uber manejar pasajeros",
    classification="ciuo",
    digits=1
)
print("Classification:", prediction)

# 2. SIMEL Labor Market Indicators
indicators = client.simel.list_indicators()
print("Available Indicators:", len(indicators))
```

---

## Documentation

For full documentation, tutorials, and API reference, visit [https://ezer-mackenzie.github.io/chile-ine-sdk/](https://ezer-mackenzie.github.io/chile-ine-sdk/).

---

## License

Distributed under the [MIT License](LICENSE.md).

