Skip to main content

A Python wrapper for the ESIOS API (Spanish electricity market)

Project description

python-esios

A Python library and CLI to query the Spanish electricity market API (ESIOS/REE).

Download indicators (prices, generation, demand), archives (I90 settlement files), and more.

Install

pip install python-esios

Configure your token

Request a personal token from REE, then:

esios config set token YOUR_TOKEN

This stores the token in ~/.config/esios/config.toml. Alternatively, set the ESIOS_API_KEY environment variable.

CLI usage

# Search indicators
esios indicators search "precio"

# Download historical data
esios indicators history 600 --start 2025-01-01 --end 2025-01-31

# Export to CSV
esios indicators history 600 -s 2025-01-01 -e 2025-01-31 --format csv --output prices.csv

# List archives
esios archives list

# Download I90 settlement files
esios archives download 1 --start 2025-01-01 --end 2025-01-31

# Cache status
esios cache status

Python usage

from esios import ESIOSClient

client = ESIOSClient()

# Get indicator data as DataFrame
handle = client.indicators.get(600)  # PVPC price
df = handle.historical("2025-01-01", "2025-01-31")

# Search indicators
results = client.indicators.search("precio")

# Download archives
client.archives.download(1, start="2025-01-01", end="2025-01-31", output_dir="./data")

Common indicators

ID Name Description
600 PVPC Voluntary price for small consumers
1001 Day-ahead price OMIE spot market price
10033 Demand Real-time electricity demand
10034 Wind generation Real-time wind generation
10035 Solar PV generation Real-time solar generation

License

GPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_esios-2.2.0.tar.gz (650.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_esios-2.2.0-py3-none-any.whl (66.2 kB view details)

Uploaded Python 3

File details

Details for the file python_esios-2.2.0.tar.gz.

File metadata

  • Download URL: python_esios-2.2.0.tar.gz
  • Upload date:
  • Size: 650.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_esios-2.2.0.tar.gz
Algorithm Hash digest
SHA256 9973140a03eb16095661f8e25d558f94b0009fb274e94158b8908f2fbde85729
MD5 53a79787976a6d3a38d4d5699d1ba9cb
BLAKE2b-256 f274f802ac1aec8c4f8037857b46b2e83c455f2e618a9d619fcd2578ba25fabf

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_esios-2.2.0.tar.gz:

Publisher: release-please.yml on datons/python-esios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_esios-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: python_esios-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 66.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_esios-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7af4cbfa8c8be2c34eaf3bd59d1c7715b22f5bc34a7339acbd1e80b4f5bea7c
MD5 4a04e69fb58415d61a889af64701e31d
BLAKE2b-256 0791fd1bdf759d5a30be0fab035cba2c4553b45a9dafec2700ec848ce46a7e73

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_esios-2.2.0-py3-none-any.whl:

Publisher: release-please.yml on datons/python-esios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page