Skip to main content

Python wrapper for RTE API requests

Project description

logo

PyPI version Python versions Tests Downloads per month License Coverage

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 :

data_type Catalog URL Documentation URL Category
actual_generations_per_production_type Link Link generation
actual_generations_per_unit Link Link generation
capacities_cpc Link Link generation
capacities_per_production_type Link Link generation
capacities_per_production_unit Link Link generation
other_market_information Link Link generation
transmission_network_unavailabilities Link Link generation
generation_unavailabilities_versions Link Link generation
transmission_network_unavailabilities_versions Link Link generation
generation_unavailabilities Link Link generation
other_market_information_versions Link Link generation
volumes_per_energy_type Link Link market
prices Link Link market
imbalance_data Link Link market
standard_rr_data Link Link market
lead_times Link Link market
afrr_marginal_price Link Link market
volumes_per_entity_price Link Link market
tso_offers Link Link market
standard_afrr_data Link Link market
volumes_per_reasons Link Link market

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

rtedata-1.0.2.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

rtedata-1.0.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file rtedata-1.0.2.tar.gz.

File metadata

  • Download URL: rtedata-1.0.2.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for rtedata-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2e00c4974ae06b39ff7207fee7ec37702262ebf071978272e2470c2b76e12e07
MD5 9677b7b0e42ccd88f75d04d7d08eb5ab
BLAKE2b-256 91ed6c1e7fd16d01dbb9047bbe2fa40dc82b0fdf7788c1a74b679589c30eada8

See more details on using hashes here.

File details

Details for the file rtedata-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: rtedata-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for rtedata-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9690fe0b22c8ad9ae590fcede6421f70e3e740f0ec1970c3288b139d2d625b8a
MD5 1f13134a1c08e179b85ea7de68175bc8
BLAKE2b-256 8166d2e7b8b5202b6ad01745a6f9aa2a3be1da1120e0f7017ccbcfdd1336e2b3

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