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.
Metadata
Release files for entsoe-apy 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| entsoe_apy-1.2.0.tar.gz | 278.3 kB | Without provenance | Details for entsoe_apy-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| entsoe_apy-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for entsoe_apy-1.2.0-py3-none-any.whl |
Total release size: 858.4 kB
Release files / entsoe_apy-1.2.0.tar.gz
| Download URL | entsoe_apy-1.2.0.tar.gz |
|---|---|
| Size | 278.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2751d2d37879bbd77a1503769fd74fc54d1373e1836853aa1518b6638acafc5a
|
|
BLAKE2b-256 checksum How to use checksums |
a940ba3a2acecc36fd00506fb91644b19a1413f3be688964162275f1d5f83562
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.11
|
Release files / entsoe_apy-1.2.0-py3-none-any.whl
| Download URL | entsoe_apy-1.2.0-py3-none-any.whl |
|---|---|
| Size | 580.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a95e3ceccf49b7248afe3a0696012f4b949eed2aa29c6c3de016c29f025762ba
|
|
BLAKE2b-256 checksum How to use checksums |
a808e3cd70ae48c98959c1444f3f7072bac6ed1e5a1f21d957eb6a8e5d628463
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.11
|
Security for entsoe-apy 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.