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 ENTSO-E Transparency Platform API endpoints
- Supports all major API functionalities
- Well-documented, easy to use and highly consistent with the API
- Automatically splits up large requests into multiple smaller calls to the API
- Retries on connection errors
- 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 the Market Group
from entsoe.utils import extract_records
EIC = "10Y1001A1001A82H" # "DE-LU" bidding zone
period_start = 201512312300
period_end = 202107022300
ep = EnergyPrices(
in_domain=EIC,
out_domain=EIC,
period_start=period_start,
period_end=period_end,
contract_market_agreement_type="A01",
)
result = ep.query_api()
records = extract_records(result)
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
Contributions
Contributions are welcome! Please open an issue or submit a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file entsoe_apy-0.3.0.tar.gz.
File metadata
- Download URL: entsoe_apy-0.3.0.tar.gz
- Upload date:
- Size: 246.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9555e5cbdf266b6f8617791858fe11dff4cbaf851c7148475be27db8ae0a1a26
|
|
| MD5 |
c3d2cf1e6042bf1c65ad5c2664800a3c
|
|
| BLAKE2b-256 |
7432217404fdefd0654c2222e62d0df49447731416e17820a19c742e3b1d3dca
|
File details
Details for the file entsoe_apy-0.3.0-py3-none-any.whl.
File metadata
- Download URL: entsoe_apy-0.3.0-py3-none-any.whl
- Upload date:
- Size: 535.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a184420b32720f8fa3022c6efd48683fb2a2510f8f25693baf2e717f4a14d424
|
|
| MD5 |
9db4e50b0a9067ec36dc867349140da0
|
|
| BLAKE2b-256 |
ceb553041ab4208c03958582744911c413398d8686bd6c40dfb2f1dd3fc04729
|