Setup
List available archives
Download a single date
Usearchives.download() for a one-step get + download:
Using the handle for more control
archives.get() returns a handle with configure() and download() methods:
Powered by Mintlify
Auto-generate your docs
Download and work with ESIOS archive files (ZIP/XLS) for detailed settlement and market data
from esios import ESIOSClient
client = ESIOSClient()
df = client.archives.list()
df[["name", "id", "horizon", "archive_type"]]
name id horizon archive_type
0 Resultado_Subasta_Mensual_POR 159 M xls
1 Resultado_Subasta_Anual_POR 160 A xls
2 Resultado_Subasta_Trimestral_POR 161 T xls
...
21 A2_liquicomun 3 M zip
22 totalp48 29 H xml
23 totalrp48prec 27 H xml
archives.download() for a one-step get + download:
path = client.archives.download(
34, # I90DIA archive
date="2024-06-15",
output_dir="data",
)
print(f"Files saved to: {path}")
Files saved to: /Users/username/.cache/esios/archives/34/I90DIA_20240615
archives.get() returns a handle with configure() and download() methods:
handle = client.archives.get(34)
print(f"Archive: {handle.name}")
print(f"ID: {handle.id}")
print(f"Metadata: {handle.metadata['archive']['description']}")
Archive: I90DIA
ID: 34
Metadata: Información de detalle por Unidad de Programación (I90DIA)