Skip to main content

A Python library for accessing ENTSO-E Transparency Platform API endpoints

Project description

ENTSO-E API Python Package

A Python library for accessing ENTSO-E Transparency Platform API endpoints.

Highlights

  • Easy access to all ENTSO-E Transparency Platform API endpoints
  • Well-documented, easy to use and highly consistent with the API
  • Automatically splits up large requests into multiple smaller calls to the API
  • Intelligent retry mechanism with exponential backoff for connection errors and service unavailability
  • Returns meaningful error messages if something goes wrong

Install

Install the package from pypi using pip:

pip install entsoe-apy

Quick Start

API Key

You need an ENTSOE API Key (also called token) refer to the official documentation on how to obtain it. The package expects an environment variable called ENTSOE_API to be set with your API key. See Configuration for more details and options.

Query Day-Ahead Prices

The package structure mirrors the official ENTSO-E API docs. So for querying "12.1.D Energy Prices" we need the entsoe.Market module and use the EnergyPrices class.

After initializing the class, we can query the data using the query_data method.

from pandas import DataFrame
from entsoe.Market import EnergyPrices
from entsoe.utils import extract_records, add_timestamps

# Query energy prices
result = EnergyPrices(
    in_domain="10YNL----------L", # Netherlands
    out_domain="10YNL----------L",
    period_start=202012312300,
    period_end=202101022300,
).query_api()

# Convert to DataFrame-ready records
records = extract_records(result)
records = add_timestamps(records)
df = DataFrame(records)
period_time_interval.start time_series.period.point.position time_series.period.point.price_amount time_series.business_type time_series.currency_unit_name time_series.price_measure_unit_name time_series.period.resolution
2018-09-30T22:00Z 1 49.3 A62 EUR MWH PT15M
2018-09-30T22:00Z 2 44.38 A62 EUR MWH PT15M
2018-09-30T22:00Z 3 36.99 A62 EUR MWH PT15M
2018-09-30T22:00Z 4 35.54 A62 EUR MWH PT15M
2018-09-30T22:00Z 5 46.5 A62 EUR MWH PT15M

The structure of the result object depends on the queried data. See the examples for more details.

Next Steps

  • ENTSOE - Class documentation
  • Mappings - EIC codes and area mappings
  • Examples - Practical examples and use cases
  • Utilities - Utility functions for data processing

Contributions

Contributions are welcome! Please open an issue or submit a pull request.

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

entsoe_apy-1.1.1.tar.gz (277.8 kB view details)

Uploaded Source

Built Distribution

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

entsoe_apy-1.1.1-py3-none-any.whl (578.8 kB view details)

Uploaded Python 3

File details

Details for the file entsoe_apy-1.1.1.tar.gz.

File metadata

  • Download URL: entsoe_apy-1.1.1.tar.gz
  • Upload date:
  • Size: 277.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.11

File hashes

Hashes for entsoe_apy-1.1.1.tar.gz
Algorithm Hash digest
SHA256 894a5f7c0e7b618c8488a79ac843a307c43cb71cd1809d487af046a6556bf033
MD5 5c7164bd40f8fb2837790b76f9d86c55
BLAKE2b-256 81147ea50fcb5fb21eab28668cfe8b8e2ac2f7956469d915afab7b2975a982e8

See more details on using hashes here.

File details

Details for the file entsoe_apy-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: entsoe_apy-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 578.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.11

File hashes

Hashes for entsoe_apy-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f17761414626ade7b93e157fcbc93102ec19fd086fb5b597535bf266729d4016
MD5 673f5d68a4a8c4071893ee64ed3c4b66
BLAKE2b-256 02be0576e3babfdf6cbf0c37f74cb2c9c6b6214fa24d4a4a249a04c9d3776a99

See more details on using hashes here.

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