Python wrapper for RTE API requests.
1. Usage
pip install rtedata
1.1. Get RTE API credentials
You need to follow these first steps in order to setup your wrapper :
- create an account on the RTE platform
- create an application associated to your account (the name and description of the app is not relevant)
- collect your app IDs (ID Client and ID Secret) available in your application dashboard
- subscribe to the relevant APIs regarding the "data_type" you request (please refer to the table in the last section to get the associated links)
1.2. Generate a data retrieval
To retrieve data using the wrapper, follow this pipeline :
from rtedata import Client
client = Client(client_id="XXX", client_secret="XXX")
dfs = client.retrieve_data(start_date="2024-01-01 00:00:00", end_date="2024-01-02 23:59:00", data_type="actual_generations_per_unit", output_dir="./output")
where :
- start_date is the first date of the data retrieval (format YYYY-MM-DD HH:MM:SS)
- end_date is the last date of the data retrieval (format YYYY-MM-DD HH:MM:SS)
- data_type is the desired data to collect (a keyword list is given in the next section). It can be a single keyword "XXX" or a list of keyword separated by a comma "XXX,YYY,ZZZ"
- output_dir (optionnal): the output directory to store the results
The generic output format is a pandas dataframe / .csv file containing the data for all dates between start_date and end_date. It will generate one file per desired data_type and will store all of them in a ./results folder with the generic name "<data_type><start_date><end_date>.csv".
2. Available data_type options
It is possible to see the full options catalog using the client attribute catalog :
from rtedata import Client
client = Client(client_id="XXX", client_secret="XXX")
client.catalog
The following table is an exhaustive list of all possible (currently handled) options for the data_type argument for the retrieval, and the description of the associated data :
Generation Data
| data_type | Catalog URL | Documentation URL |
|---|---|---|
actual_generations_per_production_type |
Link | Link |
actual_generations_per_unit |
Link | Link |
generation_mix_15min_time_scale |
Link | Link |
capacities_per_production_unit |
Link | Link |
other_market_information |
Link | Link |
transmission_network_unavailabilities |
Link | Link |
generation_unavailabilities |
Link | Link |
forecasts |
Link | Link |
Market Data
| data_type | Catalog URL | Documentation URL |
|---|---|---|
volumes_per_energy_type |
Link | Link |
prices |
Link | Link |
imbalance_data |
Link | Link |
lead_times |
Link | Link |
volumes_per_entity_type |
Link | Link |
tso_offers |
Link | Link |
volumes_per_reasons |
Link | Link |
Consumption Data
| data_type | Catalog URL | Documentation URL |
|---|---|---|
signals |
Link | Link |
volumes |
Link | Link |
tempo_like_calendars |
Link | Link |
annual_forecasts |
Link | Link |
weekly_forecasts |
Link | Link |
short_term |
Link | Link |
consolidated_power_consumption |
Link | Link |
consolidated_energy_consumption |
Link | Link |
Metadata
Release files for rtedata 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rtedata-1.0.5.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rtedata-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.5 kB
Release files / rtedata-1.0.5.tar.gz
| Download URL | rtedata-1.0.5.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44961678311cec2a8947c55f26d2e7ef6f3bed35cc1c4cb96b9289509f540440
|
|
BLAKE2b-256 checksum How to use checksums |
b51b827eaf47a7d0c3f0f095d0e60dd61502ce9f5225f44b0a1d3477fa4ce197
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.15
|
Release files / rtedata-1.0.5-py3-none-any.whl
| Download URL | rtedata-1.0.5-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51f4b7aacbf6e32efb4de40390194858c3c87ac30b7e321f134ebfb879b432e0
|
|
BLAKE2b-256 checksum How to use checksums |
cf2f0c30ef476a563f87f08fd3b9a270f1ecc2229b8edbf7243594f7f13b24c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.15
|