python-esios 2.0.2__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_esios-2.0.2/.github/workflows/publish.yml → python_esios-2.2.0/.github/workflows/release-please.yml +18 -4
- {python_esios-2.0.2 → python_esios-2.2.0}/.gitignore +6 -0
- python_esios-2.2.0/.release-please-manifest.json +3 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/CHANGELOG.md +33 -0
- python_esios-2.2.0/CLAUDE.md +21 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/PKG-INFO +9 -2
- {python_esios-2.0.2 → python_esios-2.2.0}/pyproject.toml +9 -2
- python_esios-2.2.0/release-please-config.json +19 -0
- python_esios-2.2.0/src/esios/.agents/skills/esios/SKILL.md +182 -0
- python_esios-2.2.0/src/esios/catalog.py +478 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cli/app.py +2 -0
- python_esios-2.2.0/src/esios/cli/catalog_cmd.py +177 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/client.py +5 -0
- python_esios-2.2.0/src/esios/data/archives.yaml +921 -0
- python_esios-2.2.0/src/esios/data/geos.yaml +3 -0
- python_esios-2.2.0/src/esios/data/indicators.yaml +43 -0
- python_esios-2.2.0/src/esios/data/magnitudes.yaml +3 -0
- python_esios-2.2.0/src/esios/data/time_periods.yaml +3 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/managers/archives.py +2 -4
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/test_managers.py +9 -2
- python_esios-2.0.2/src/esios/.agents/skills/esios/SKILL.md +0 -207
- python_esios-2.0.2/src/esios/data/catalogs/archives/__init__.py +0 -5
- python_esios-2.0.2/src/esios/data/catalogs/archives/catalog.py +0 -163
- python_esios-2.0.2/src/esios/data/catalogs/archives/refresh.py +0 -95
- python_esios-2.0.2/tests/__init__.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/LICENSE +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/README.md +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/.gitignore +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/01_Quickstart/01_Setup and First Query.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/02_Indicators/01_Search Indicators.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/02_Indicators/02_Historical Data.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/02_Indicators/03_Multi-Geography Indicators.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/02_Indicators/04_Compare Indicators.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/02_Indicators/05_Market Prices.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/02_Indicators/06_Generation and Demand.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/03_Archives/01_Download Archives.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/03_Archives/02_I90 Settlement Files.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/04_Caching/01_Cache Management.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/05_Advanced/01_Ad-hoc Pandas Expressions.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/05_Advanced/02_Async Client.ipynb +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/01_Quickstart/01_Setup and First Query.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/02_Indicators/01_Search Indicators.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/02_Indicators/02_Historical Data.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/02_Indicators/03_Multi-Geography Indicators.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/02_Indicators/04_Compare Indicators.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/02_Indicators/05_Market Prices.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/02_Indicators/06_Generation and Demand.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/03_Archives/01_Download Archives.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/03_Archives/02_I90 Settlement Files.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/04_Caching/01_Cache Management.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/05_Advanced/01_Ad-hoc Pandas Expressions.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/_specs/05_Advanced/02_Async Client.yaml +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/examples/generate.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/__init__.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/async_client.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cache.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cli/__init__.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cli/archives.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cli/cache_cmd.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cli/config.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cli/config_cmd.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cli/exec_cmd.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/cli/indicators.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/constants.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/data/__init__.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/exceptions.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/managers/__init__.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/managers/base.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/managers/indicators.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/managers/offer_indicators.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/models/__init__.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/models/archive.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/models/indicator.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/models/offer_indicator.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/processing/__init__.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/processing/dataframes.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/processing/i90.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/src/esios/processing/zip.py +0 -0
- {python_esios-2.0.2/src/esios/data/catalogs → python_esios-2.2.0/tests}/__init__.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/conftest.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/test_cache.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/test_client.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/test_dataframes.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/test_exceptions.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/test_i90.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/test_models.py +0 -0
- {python_esios-2.0.2 → python_esios-2.2.0}/tests/test_zip.py +0 -0
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Release Please
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches: [main]
|
|
6
6
|
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
7
11
|
jobs:
|
|
12
|
+
release-please:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
16
|
+
steps:
|
|
17
|
+
- uses: googleapis/release-please-action@v4
|
|
18
|
+
id: release
|
|
19
|
+
with:
|
|
20
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
|
|
8
22
|
publish:
|
|
23
|
+
needs: release-please
|
|
24
|
+
if: needs.release-please.outputs.release_created == 'true'
|
|
9
25
|
runs-on: ubuntu-latest
|
|
10
26
|
permissions:
|
|
11
|
-
id-token: write
|
|
27
|
+
id-token: write
|
|
12
28
|
steps:
|
|
13
29
|
- uses: actions/checkout@v4
|
|
14
30
|
|
|
@@ -24,5 +40,3 @@ jobs:
|
|
|
24
40
|
|
|
25
41
|
- name: Publish to PyPI
|
|
26
42
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
27
|
-
with:
|
|
28
|
-
skip-existing: true
|
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.0](https://github.com/datons/python-esios/compare/python-esios-v2.1.0...python-esios-v2.2.0) (2026-03-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add YAML-backed catalog with enriched indicator metadata ([00cc4b6](https://github.com/datons/python-esios/commit/00cc4b69a66268d6d4d6e63ce7d4d8f91c7e813a))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* update skill with catalog commands and Python-first approach ([6051fb3](https://github.com/datons/python-esios/commit/6051fb31cbea2dce0b5eaeb87a561c33d8d8d4e6))
|
|
14
|
+
|
|
15
|
+
## [2.1.0](https://github.com/datons/python-esios/compare/python-esios-v2.0.2...python-esios-v2.1.0) (2026-03-04)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add archives sheets and exec CLI commands for I90 processing ([b54f94a](https://github.com/datons/python-esios/commit/b54f94adfa56ee2150fc85f92055b002b0d3e9bb))
|
|
21
|
+
* add static archives catalog (153 archives) and improve download API ([22e6095](https://github.com/datons/python-esios/commit/22e60953fb3d5314452c03807be3e12595b88fd4))
|
|
22
|
+
* replace manual PyPI workflow with release-please ([3c0dcb3](https://github.com/datons/python-esios/commit/3c0dcb35b01a47ea489d5a1ecb891d6805486356))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* correct author email to datons.com ([8e17132](https://github.com/datons/python-esios/commit/8e1713248a56928ba61898b5b84b0b4689798ce3))
|
|
28
|
+
* rename release-please config to expected non-dotted filename ([2f53b76](https://github.com/datons/python-esios/commit/2f53b7658c3f3e02e53dcbb3a2fe149b8f16ad7c))
|
|
29
|
+
* update archives test to match static catalog default ([9bbd98b](https://github.com/datons/python-esios/commit/9bbd98b56dee2ae1cfbed24537ad989f5214ae76))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Performance
|
|
33
|
+
|
|
34
|
+
* lazy sheet loading in I90Book — only read sheets on demand ([2dfe941](https://github.com/datons/python-esios/commit/2dfe941bf71c74bb0bd07c72c90e92b61a0d3059))
|
|
35
|
+
|
|
3
36
|
## [2.0.0] - 2026-02-27
|
|
4
37
|
|
|
5
38
|
Complete rewrite of the library with a new architecture, CLI, and caching system.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# python-esios
|
|
2
|
+
|
|
3
|
+
## Releasing
|
|
4
|
+
|
|
5
|
+
This project uses [release-please](https://github.com/googleapis/release-please) for automated versioning and publishing.
|
|
6
|
+
|
|
7
|
+
**How it works:**
|
|
8
|
+
|
|
9
|
+
1. Write conventional commits (`feat:`, `fix:`, `chore:`, etc.)
|
|
10
|
+
2. On push to `main`, release-please auto-opens/updates a **Release PR** with version bump + CHANGELOG
|
|
11
|
+
3. Merge the Release PR → GitHub Release + tag created → PyPI publish via trusted publishing
|
|
12
|
+
|
|
13
|
+
**Key files:**
|
|
14
|
+
|
|
15
|
+
- `release-please-config.json` — release-please configuration (package type, changelog sections)
|
|
16
|
+
- `.release-please-manifest.json` — tracks current version
|
|
17
|
+
- `.github/workflows/release-please.yml` — workflow (release PR management + PyPI publish)
|
|
18
|
+
|
|
19
|
+
**Version is tracked in** `pyproject.toml` (`project.version`). Release-please bumps it automatically based on commit types (`feat:` → minor, `fix:` → patch).
|
|
20
|
+
|
|
21
|
+
**Never bump the version manually** — let release-please handle it via the Release PR.
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-esios
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: A Python wrapper for the ESIOS API (Spanish electricity market)
|
|
5
5
|
Project-URL: Homepage, https://github.com/datons/python-esios
|
|
6
6
|
Project-URL: Repository, https://github.com/datons/python-esios
|
|
7
|
-
|
|
7
|
+
Project-URL: Issues, https://github.com/datons/python-esios/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/datons/python-esios/releases
|
|
9
|
+
Author-email: Jesús López <jesus.lopez@datons.com>
|
|
8
10
|
License-Expression: GPL-3.0-only
|
|
9
11
|
License-File: LICENSE
|
|
12
|
+
Keywords: api,electricity,energy,esios,ree,spain
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
15
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
11
16
|
Classifier: Operating System :: OS Independent
|
|
12
17
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -14,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
17
23
|
Requires-Python: >=3.10
|
|
18
24
|
Requires-Dist: beautifulsoup4>=4.12
|
|
19
25
|
Requires-Dist: httpx>=0.27
|
|
@@ -21,6 +27,7 @@ Requires-Dist: pandas>=2.0
|
|
|
21
27
|
Requires-Dist: pyarrow>=15.0
|
|
22
28
|
Requires-Dist: pydantic>=2.0
|
|
23
29
|
Requires-Dist: python-calamine>=0.2
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
24
31
|
Requires-Dist: rich>=13.0
|
|
25
32
|
Requires-Dist: tenacity>=8.0
|
|
26
33
|
Requires-Dist: typer>=0.12
|
|
@@ -4,15 +4,18 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-esios"
|
|
7
|
-
version = "2.0
|
|
7
|
+
version = "2.2.0"
|
|
8
8
|
description = "A Python wrapper for the ESIOS API (Spanish electricity market)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "GPL-3.0-only"
|
|
11
11
|
requires-python = ">=3.10"
|
|
12
12
|
authors = [
|
|
13
|
-
{ name = "Jesús López", email = "jesus.lopez@datons.
|
|
13
|
+
{ name = "Jesús López", email = "jesus.lopez@datons.com" },
|
|
14
14
|
]
|
|
15
|
+
keywords = ["esios", "ree", "energy", "electricity", "spain", "api"]
|
|
15
16
|
classifiers = [
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
|
+
"Intended Audience :: Science/Research",
|
|
16
19
|
"Programming Language :: Python :: 3",
|
|
17
20
|
"Programming Language :: Python :: 3.10",
|
|
18
21
|
"Programming Language :: Python :: 3.11",
|
|
@@ -20,6 +23,7 @@ classifiers = [
|
|
|
20
23
|
"Programming Language :: Python :: 3.13",
|
|
21
24
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
22
25
|
"Operating System :: OS Independent",
|
|
26
|
+
"Topic :: Scientific/Engineering",
|
|
23
27
|
]
|
|
24
28
|
dependencies = [
|
|
25
29
|
"httpx>=0.27",
|
|
@@ -31,6 +35,7 @@ dependencies = [
|
|
|
31
35
|
"beautifulsoup4>=4.12",
|
|
32
36
|
"typer>=0.12",
|
|
33
37
|
"rich>=13.0",
|
|
38
|
+
"pyyaml>=6.0",
|
|
34
39
|
]
|
|
35
40
|
|
|
36
41
|
[project.scripts]
|
|
@@ -39,6 +44,8 @@ esios = "esios.cli:app"
|
|
|
39
44
|
[project.urls]
|
|
40
45
|
Homepage = "https://github.com/datons/python-esios"
|
|
41
46
|
Repository = "https://github.com/datons/python-esios"
|
|
47
|
+
Issues = "https://github.com/datons/python-esios/issues"
|
|
48
|
+
Changelog = "https://github.com/datons/python-esios/releases"
|
|
42
49
|
|
|
43
50
|
[tool.hatch.build.targets.wheel]
|
|
44
51
|
packages = ["src/esios"]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": {
|
|
3
|
+
".": {
|
|
4
|
+
"release-type": "python",
|
|
5
|
+
"package-name": "python-esios",
|
|
6
|
+
"extra-files": [
|
|
7
|
+
"pyproject.toml"
|
|
8
|
+
],
|
|
9
|
+
"changelog-sections": [
|
|
10
|
+
{ "type": "feat", "section": "Features" },
|
|
11
|
+
{ "type": "fix", "section": "Bug Fixes" },
|
|
12
|
+
{ "type": "perf", "section": "Performance" },
|
|
13
|
+
{ "type": "docs", "section": "Documentation", "hidden": true },
|
|
14
|
+
{ "type": "chore", "section": "Miscellaneous", "hidden": true }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
19
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: esios
|
|
3
|
+
description: Query Spanish electricity market data (ESIOS/REE). Use when the user asks about electricity prices, generation, demand, I90 files, or any ESIOS indicator.
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ESIOS Data Assistant
|
|
8
|
+
|
|
9
|
+
You have access to the `python-esios` library and CLI for querying the Spanish electricity market (ESIOS/REE).
|
|
10
|
+
|
|
11
|
+
## When to use what
|
|
12
|
+
|
|
13
|
+
- **Python scripts** (default): reproducible, composable, saveable. Use for any data work the user will want to keep or iterate on.
|
|
14
|
+
- **CLI**: quick one-shot lookups, exploration, sanity checks. Use when the user wants a fast answer they won't need again.
|
|
15
|
+
- **If unsure**: ask the user whether they want a script or a quick CLI check.
|
|
16
|
+
|
|
17
|
+
## Python Library (default)
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from esios import ESIOSClient
|
|
21
|
+
|
|
22
|
+
client = ESIOSClient() # reads config file, then ESIOS_API_KEY env var
|
|
23
|
+
|
|
24
|
+
# --- Indicators ---
|
|
25
|
+
|
|
26
|
+
# Get indicator handle
|
|
27
|
+
handle = client.indicators.get(600)
|
|
28
|
+
|
|
29
|
+
# Historical data as DataFrame
|
|
30
|
+
df = handle.historical("2025-01-01", "2025-01-31")
|
|
31
|
+
|
|
32
|
+
# Filter by geography
|
|
33
|
+
df = handle.historical("2025-01-01", "2025-01-31", geo_ids=[3]) # España only
|
|
34
|
+
|
|
35
|
+
# Inspect geographies
|
|
36
|
+
handle.geos # List of {"geo_id": int, "geo_name": str}
|
|
37
|
+
handle.geos_dataframe() # DataFrame with geo_id and geo_name columns
|
|
38
|
+
handle.resolve_geo("España") # Returns 3
|
|
39
|
+
|
|
40
|
+
# Search indicators
|
|
41
|
+
results = client.indicators.search("precio")
|
|
42
|
+
|
|
43
|
+
# Compare multiple indicators
|
|
44
|
+
df = client.indicators.compare([600, 10034, 10035], "2025-01-01", "2025-01-07")
|
|
45
|
+
|
|
46
|
+
# --- I90 Settlement Files ---
|
|
47
|
+
|
|
48
|
+
from esios.processing.i90 import I90Book
|
|
49
|
+
|
|
50
|
+
archive = client.archives.get(34)
|
|
51
|
+
books = I90Book.from_archive(archive, start="2025-05-05", end="2025-06-08")
|
|
52
|
+
|
|
53
|
+
book = books[0]
|
|
54
|
+
sheet = book["I90DIA03"]
|
|
55
|
+
df = sheet.df # Preprocessed DataFrame with datetime index
|
|
56
|
+
print(sheet.frequency) # "hourly" or "hourly-quarterly"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Common Indicator IDs
|
|
60
|
+
|
|
61
|
+
| ID | Name | Description | Geos |
|
|
62
|
+
|----|------|-------------|------|
|
|
63
|
+
| 600 | Precio mercado spot | OMIE spot market price | ES, PT, FR, DE, BE, NL |
|
|
64
|
+
| 1001 | Precio mercado diario | Day-ahead market price | ES |
|
|
65
|
+
| 10033 | Demanda real | Real-time electricity demand | ES |
|
|
66
|
+
| 10034 | Generación eólica | Real-time wind generation | ES |
|
|
67
|
+
| 10035 | Generación solar FV | Real-time solar PV generation | ES |
|
|
68
|
+
| 1293 | Demanda prevista | Forecasted demand | ES |
|
|
69
|
+
|
|
70
|
+
Use `client.indicators.search("query")` to find more.
|
|
71
|
+
|
|
72
|
+
### Multi-Geo Indicators
|
|
73
|
+
|
|
74
|
+
Some indicators (e.g. 600) return data for multiple countries. Output is pivoted so each geography becomes a column:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
datetime España Portugal Francia Alemania Bélgica Países Bajos
|
|
78
|
+
2025-01-01 00:00:00 63.50 63.50 72.10 58.20 58.20 58.20
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Geography Reference
|
|
82
|
+
|
|
83
|
+
| geo_id | geo_name |
|
|
84
|
+
|--------|----------|
|
|
85
|
+
| 1 | Portugal |
|
|
86
|
+
| 2 | Francia |
|
|
87
|
+
| 3 | España |
|
|
88
|
+
| 8826 | Alemania |
|
|
89
|
+
| 8827 | Bélgica |
|
|
90
|
+
| 8828 | Países Bajos |
|
|
91
|
+
|
|
92
|
+
### I90 Key Sheets
|
|
93
|
+
|
|
94
|
+
| Sheet | Description |
|
|
95
|
+
|-------|-------------|
|
|
96
|
+
| I90DIA03 | Restricciones en el Mercado Diario (curtailment) |
|
|
97
|
+
| I90DIA08 | Restricciones en Tiempo Real |
|
|
98
|
+
| I90DIA26 | Programa Base de Funcionamiento (PBF, generation program) |
|
|
99
|
+
| I90DIA01 | Programa PVP |
|
|
100
|
+
| I90DIA07 | Regulación Terciaria (mFRR) |
|
|
101
|
+
|
|
102
|
+
### Key conventions
|
|
103
|
+
|
|
104
|
+
- All timestamps are in Europe/Madrid timezone
|
|
105
|
+
- Date ranges > 3 weeks are auto-chunked into smaller API requests
|
|
106
|
+
- Data older than 48h is considered final (won't be re-fetched)
|
|
107
|
+
- Recent data (last 48h) is re-fetched on each request (electricity market corrections)
|
|
108
|
+
- Cache is per-column sparse: fetching `geo_ids=[3]` only caches that column
|
|
109
|
+
- Custom exceptions: `ESIOSError`, `AuthenticationError`, `APIResponseError`, `NetworkError`
|
|
110
|
+
|
|
111
|
+
## CLI Reference (quick lookups)
|
|
112
|
+
|
|
113
|
+
### Catalog (offline)
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
esios catalog list indicators # List cataloged indicators
|
|
117
|
+
esios catalog list indicators "precio" # Filter by name
|
|
118
|
+
esios catalog list archives # List cataloged archives
|
|
119
|
+
esios catalog show indicator 600 # Details for indicator
|
|
120
|
+
esios catalog show archive 34 # Details for archive
|
|
121
|
+
esios catalog refresh # Refresh from live API
|
|
122
|
+
esios catalog refresh --dry-run # Preview changes
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Indicators
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
esios indicators list # List all indicators
|
|
129
|
+
esios indicators search "precio" # Search by name
|
|
130
|
+
esios indicators meta 600 # Show metadata
|
|
131
|
+
esios indicators history 600 -s 2025-01-01 -e 2025-01-31
|
|
132
|
+
esios indicators history 600 -s 2025-01-01 -e 2025-01-31 --geo España
|
|
133
|
+
esios indicators history 600 -s 2025-01-01 -e 2025-01-31 --format csv --output data.csv
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Archives
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
esios archives list # List available archives
|
|
140
|
+
esios archives download 34 -s 2025-05-01 -e 2025-05-31 --output ./data
|
|
141
|
+
esios archives sheets 34 --date 2025-06-01 # List sheets in I90 file
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Exec (ad-hoc pandas)
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Indicators
|
|
148
|
+
esios indicators exec 600 -s 2025-01-01 -e 2025-01-31 -x "df.describe()"
|
|
149
|
+
esios indicators exec 600 -s 2025-01-01 -e 2025-01-31 --geo España -x "df.resample('D').mean()"
|
|
150
|
+
esios indicators exec 600 10034 -s 2025-01-01 -e 2025-01-31 -x "df.corr()"
|
|
151
|
+
|
|
152
|
+
# Archives (I90)
|
|
153
|
+
esios archives exec 34 --sheet I90DIA03 --date 2025-06-01 -x "df.groupby('Sentido')['value'].sum()"
|
|
154
|
+
esios archives exec 34 --sheet I90DIA03 -s 2025-05-05 -e 2025-06-08 \
|
|
155
|
+
-x "df[df['Sentido']=='Bajar'].groupby('Unidad de Programación')['value'].sum().sort_values()"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Cache management
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
esios cache status # Path, size, registry info
|
|
162
|
+
esios cache geos # Global geo_id → geo_name registry
|
|
163
|
+
esios cache clear # Clear indicator cache
|
|
164
|
+
esios cache clear --all # Clear everything
|
|
165
|
+
esios cache clear --indicator 600 # Clear one indicator
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Output options
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
--format table|csv|json|parquet (default: table)
|
|
172
|
+
--output file.csv (write to file instead of stdout)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Configuration
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
esios config set token <API_KEY>
|
|
179
|
+
esios config show
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Config file: `~/.config/esios/config.toml`. API key resolution: config file > `ESIOS_API_KEY` env var.
|