from spotforecast2_safe.downloader.entsoe import download_side_tables
# Fail-loud (default): any provider error propagates immediately.
download_side_tables(
api_key="YOUR_API_KEY",
start="202301010000",
end="202301050000",
force=True,
)
# Opt-in degradation: renewable failure is logged but price is still
# attempted. Use only in non-safety-critical refresh workflows.
download_side_tables(
api_key="YOUR_API_KEY",
on_provider_failure="skip",
)downloader.entsoe.download_side_tables
downloader.entsoe.download_side_tables(
api_key,
*,
start=None,
end=None,
country_code='DE',
price_country_code='DE_LU',
force=False,
timeout=60.0,
on_provider_failure='raise',
)Download both ENTSO-E day-ahead side tables in one call.
Calls download_renewable_forecast (with country_code) followed by download_day_ahead_price (with price_country_code). Both providers share the same start, end, force, and timeout arguments.
The library default is fail-loud: when on_provider_failure is "raise" (the default), the first provider exception propagates immediately and the second provider is never attempted. Pass on_provider_failure="skip" to opt into degraded-but-continuing behaviour: each provider failure is logged at WARNING level and the next provider is still attempted. "skip" is intended for opportunistic refreshes where a partial update is better than no update; it must not be used in safety-critical pipelines where missing a table is a hard error.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| api_key | str | ENTSO-E Web API security token. | required |
| start | Optional[str] | Start in 'YYYYMMDDHHMM' format, or None to use each downloader’s own default (seven days ago). |
None |
| end | Optional[str] | End in 'YYYYMMDDHHMM' format, or None to use each downloader’s own default (start of tomorrow). |
None |
| country_code | str | Bidding-zone or country code for the renewable forecast query. Defaults to "DE". |
'DE' |
| price_country_code | str | Bidding-zone code for the day-ahead price query. Defaults to "DE_LU". |
'DE_LU' |
| force | bool | If True, bypass the small-window cooldown check in each downloader. |
False |
| timeout | Optional[float] | Per-socket-operation read timeout in seconds passed to each downloader. None disables the timeout. Defaults to 60.0. |
60.0 |
| on_provider_failure | str | How to handle a provider-level exception. "raise" (default) — let the exception propagate immediately. "skip" — log a WARNING and continue to the next provider. Any other value raises ValueError before any download begins. |
'raise' |
Returns
| Name | Type | Description |
|---|---|---|
| None | None |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If on_provider_failure is not "raise" or "skip". |
|
| ImportError | If entsoe-py is not installed (propagated from the individual downloaders when on_provider_failure is "raise"). |
|
| RuntimeError | If a download fails after _MAX_RETRIES attempts and on_provider_failure is "raise". |