energy_data_retrieval.sources.entsoe.client#

ENTSO-E actual generation, with UTC intervals and explicit consumption flows.

The Transparency Platform reports interval-average power in MW. A03 points are step changes, not a sparse list of independent samples. Missing quantities remain missing, including when the missing block extends across several positions.

energy_data_retrieval.sources.entsoe.client.generation_requests(area, start, end, *, per_unit=False, psr_type=None, unit_id=None, maximum_requests=366)[source]#

Plan non-secret requests for [start, end) in UTC.

Aggregate queries use conservative 31-day chunks; per-unit queries use one-day chunks. EICs are explicit because countries and bidding zones are not always interchangeable. This function makes no network requests.

Parameters:
  • area (str)

  • start (datetime)

  • end (datetime)

  • per_unit (bool)

  • psr_type (str | None)

  • unit_id (str | None)

  • maximum_requests (int)

Return type:

tuple[dict[str, str], …]

energy_data_retrieval.sources.entsoe.client.normalize_generation(xml, *, maximum_rows=1000000, maximum_bytes=33554432)[source]#

Parse an A75/A73 realised-generation XML document without network access.

A01 absent positions are represented by NaN. A03 changes are expanded only within their own Period; an explicit missing quantity stops the prior value. Generation and consumption remain separate positive/negative-as-published flows. Values are never clipped, imputed, or summed across these flows.

An acknowledgement with reason 999 and the provider’s explicit no-matching- data message returns an empty frame. Other acknowledgements fail, without echoing provider text that might contain credential-bearing request URLs.

Parameters:
  • xml (str | bytes)

  • maximum_rows (int)

  • maximum_bytes (int)

Return type:

DataFrame

class energy_data_retrieval.sources.entsoe.client.ENTSOEGeneration(data, requests)[source]#

Bases: object

Long-form interval-average power and sanitized HTTP request provenance.

Parameters:
data: DataFrame#
requests: tuple[RequestRecord, ...]#
class energy_data_retrieval.sources.entsoe.client.ENTSOEClient(http, token='', maximum_requests=366, maximum_rows=1000000)[source]#

Bases: object

Authenticated actual-generation retrieval; never requests forecasts.

Parameters:
  • http (HTTPClient)

  • token (str)

  • maximum_requests (int)

  • maximum_rows (int)

http: HTTPClient#
token: str#
maximum_requests: int#
maximum_rows: int#
classmethod from_environment(http)[source]#
Parameters:

http (HTTPClient)

Return type:

ENTSOEClient

generation_by_type(area, start, end, *, psr_type=None)[source]#

Actual generation per production type (A75/A16), with consumption separate.

Parameters:
  • area (str)

  • start (datetime)

  • end (datetime)

  • psr_type (str | None)

Return type:

ENTSOEGeneration

generation_by_unit(area, start, end, *, psr_type=None, unit_id=None)[source]#

Actual generation per unit (A73/A16), queried in one-day chunks.

Parameters:
  • area (str)

  • start (datetime)

  • end (datetime)

  • psr_type (str | None)

  • unit_id (str | None)

Return type:

ENTSOEGeneration