energy_data_retrieval.sources.aeso.client#

AESO net generation, with capacity and contingency reserve kept separate.

energy_data_retrieval.sources.aeso.client.parse_current_generation(payload, *, maximum_rows=100000)[source]#

Parse the official Current Supply Demand v1 asset response in MW.

last_updated_datetime_utc is authoritative; the MPT display time is retained separately. Current readings are snapshots, not interval energy. Maximum capability and dispatched contingency reserve are separate fields.

Parameters:
  • payload (JSONValue)

  • maximum_rows (int)

Return type:

DataFrame

energy_data_retrieval.sources.aeso.client.parse_generation_csv(payload, *, interval_minutes=60, maximum_rows=1000000)[source]#

Parse a native AESO CSD Generation historical CSV; Volume is mean MW.

The caller must identify the source export as hourly (60) or five-minute (5). The explicit Date (MST) column uses fixed UTC-07 throughout the year; Date (MPT) is retained and never guessed across daylight-saving folds. Native capability fields remain separate from actual Volume.

Parameters:
  • payload (str)

  • interval_minutes (int)

  • maximum_rows (int)

Return type:

DataFrame

class energy_data_retrieval.sources.aeso.client.AESOClient(http, maximum_rows=1000000)[source]#

Bases: object

Current API retrieval plus bounded import of AESO’s public historical CSV.

Parameters:
http: HTTPClient#
maximum_rows: int#
current_generation(*, api_key, asset_ids=None)[source]#

Fetch one current report. AESO account and free API subscription required.

Secrets travel only in API-KEY and are excluded from provenance. No repeated polling or historical availability is implied by this method.

Parameters:
  • api_key (str)

  • asset_ids (list[str] | None)

Return type:

GenerationResult

from_native_file(path, *, interval_minutes=60, maximum_bytes=67108864)[source]#

Import a user-downloaded historical CSV with a bounded read and SHA-256.

The public AESO Box archive serves ZIP downloads through changing redirect hosts. This method accepts an extracted native CSV and does not pretend that it performed an HTTP acquisition (requests is empty).

Parameters:
  • path (Path)

  • interval_minutes (int)

  • maximum_bytes (int)

Return type:

GenerationResult