Metadata-Version: 2.4
Name: datons
Version: 0.4.0
Summary: Python client for Datons data APIs
Project-URL: Homepage, https://datons.com
Project-URL: Documentation, https://datons.com/apps/esios-data/docs
Project-URL: Repository, https://github.com/datons/python-datons
Project-URL: Issues, https://github.com/datons/python-datons/issues
Author-email: Jesús López <jesus.lopez@datons.com>
License-Expression: MIT
Keywords: api,data,datons,electricity,energy,esios,spain
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: polars>=1.0
Requires-Dist: pydantic>=2.0
Provides-Extra: pandas
Requires-Dist: pandas>=2.0; extra == 'pandas'
Description-Content-Type: text/markdown

# datons

Python client for [Datons](https://datons.com) data APIs.

## Installation

```bash
pip install datons
```

## Quick start

```python
from datons import Client

client = Client(token="esd_live_...")

# Query preprocessed I90 market data
df = client.esios.query(
    "SELECT unit, datetime, energy, price "
    "FROM operational_data_15min "
    "WHERE program = 'PDBF' AND date >= '2025-01-01' "
    "LIMIT 100"
)

# Dataset metadata (schema, programs, stats)
meta = client.esios.metadata()

# Search for units, companies, technologies
results = client.esios.search("iberdrola")
```

## Authentication

Get your API key at [datons.com/apps/esios-data](https://datons.com/apps/esios-data).

Pass it directly or set the `DATONS_API_KEY` environment variable:

```bash
export DATONS_API_KEY="esd_live_..."
```

```python
from datons import Client

client = Client()  # picks up DATONS_API_KEY
```
