diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-11 13:41:00 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 13:41:00 +0000 |
| commit | a24ccb6228b3a689741e4bc976628cdd8388e7aa (patch) | |
| tree | 19174d60d5c5c2aef819f40d46951aec7b2a9238 | |
| parent | 2eda166a235e1487f55fe9fcad56820ba80d9ad4 (diff) | |
automatic import of python-entsoe-py
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-entsoe-py.spec | 544 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 546 insertions, 0 deletions
@@ -0,0 +1 @@ +/entsoe-py-0.5.9.tar.gz diff --git a/python-entsoe-py.spec b/python-entsoe-py.spec new file mode 100644 index 0000000..6c5e5e4 --- /dev/null +++ b/python-entsoe-py.spec @@ -0,0 +1,544 @@ +%global _empty_manifest_terminate_build 0 +Name: python-entsoe-py +Version: 0.5.9 +Release: 1 +Summary: A python API wrapper for ENTSO-E +License: MIT +URL: https://github.com/EnergieID/entsoe-py +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/59/47/f9a3a36017a9b02eebc5b104801cf9ab9143e8777a16276b5a140f0d3948/entsoe-py-0.5.9.tar.gz +BuildArch: noarch + +Requires: python3-requests +Requires: python3-pytz +Requires: python3-beautifulsoup4 +Requires: python3-pandas + +%description +# entsoe-py +Python client for the ENTSO-E API (european network of transmission system operators for electricity) + +Documentation of the API found on https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html + +## Installation +`python3 -m pip install entsoe-py` + +## Usage +The package comes with 2 clients: +- [`EntsoeRawClient`](#EntsoeRawClient): Returns data in its raw format, usually XML or a ZIP-file containing XML's +- [`EntsoePandasClient`](#EntsoePandasClient): Returns data parsed as a Pandas Series or DataFrame +### <a name="EntsoeRawClient"></a>EntsoeRawClient +```python +from entsoe import EntsoeRawClient +import pandas as pd + +client = EntsoeRawClient(api_key=<YOUR API KEY>) + +start = pd.Timestamp('20171201', tz='Europe/Brussels') +end = pd.Timestamp('20180101', tz='Europe/Brussels') +country_code = 'BE' # Belgium +country_code_from = 'FR' # France +country_code_to = 'DE_LU' # Germany-Luxembourg +type_marketagreement_type = 'A01' +contract_marketagreement_type = 'A01' + +# methods that return XML +client.query_day_ahead_prices(country_code, start, end) +client.query_net_position(country_code, start, end, dayahead=True) +client.query_load(country_code, start, end) +client.query_load_forecast(country_code, start, end) +client.query_wind_and_solar_forecast(country_code, start, end, psr_type=None) +client.query_generation_forecast(country_code, start, end) +client.query_generation(country_code, start, end, psr_type=None) +client.query_generation_per_plant(country_code, start, end, psr_type=None) +client.query_installed_generation_capacity(country_code, start, end, psr_type=None) +client.query_installed_generation_capacity_per_unit(country_code, start, end, psr_type=None) +client.query_crossborder_flows(country_code_from, country_code_to, start, end) +client.query_scheduled_exchanges(country_code_from, country_code_to, start, end, dayahead=False) +client.query_net_transfer_capacity_dayahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_weekahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_monthahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_yearahead(country_code_from, country_code_to, start, end) +client.query_intraday_offered_capacity(country_code_from, country_code_to, start, end, implicit=True) +client.query_offered_capacity(country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True) +client.query_contracted_reserve_prices(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_contracted_reserve_amount(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_procured_balancing_capacity(country_code, start, end, process_type, type_marketagreement_type=None) +client.query_aggregate_water_reservoirs_and_hydro_storage(country_code, start, end) + +# methods that return ZIP (bytes) +client.query_imbalance_prices(country_code, start, end, psr_type=None) +client.query_unavailability_of_generation_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_of_production_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_transmission(country_code_from, country_code_to, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_withdrawn_unavailability_of_generation_units(country_code, start, end) +``` +#### Dump result to file +```python +xml_string = client.query_day_ahead_prices(country_code, start, end) +with open('outfile.xml', 'w') as f: + f.write(xml_string) + +zip_bytes = client.query_unavailability_of_generation_units(country_code, start, end) +with open('outfile.zip', 'wb') as f: + f.write(zip_bytes) +``` +#### Making another request +Is the API-call you want not in the list, you can lookup the parameters yourself in the API documentation +```python +params = { + 'documentType': 'A44', + 'in_Domain': '10YBE----------2', + 'out_Domain': '10YBE----------2' +} +response = client._base_request(params=params, start=start, end=end) +print(response.text) +``` + +### <a name="EntsoePandasClient"></a>EntsoePandasClient +The Pandas Client works similar to the Raw Client, with extras: +- Time periods that span more than 1 year are automatically dealt with +- Requests of large numbers of files are split over multiple API calls + +Please note that this client requires you to specifically set a start= and end= parameter which should be a pandas timestamp with timezone. +If not it will throw an exception +```python +from entsoe import EntsoePandasClient +import pandas as pd + +client = EntsoePandasClient(api_key=<YOUR API KEY>) + +start = pd.Timestamp('20171201', tz='Europe/Brussels') +end = pd.Timestamp('20180101', tz='Europe/Brussels') +country_code = 'BE' # Belgium +country_code_from = 'FR' # France +country_code_to = 'DE_LU' # Germany-Luxembourg +type_marketagreement_type = 'A01' +contract_marketagreement_type = "A01" + +# methods that return Pandas Series +client.query_day_ahead_prices(country_code, start=start,end=end) +client.query_net_position(country_code, start=start, end=end, dayahead=True) +client.query_crossborder_flows(country_code_from, country_code_to, start, end) +client.query_scheduled_exchanges(country_code_from, country_code_to, start, end, dayahead=False) +client.query_net_transfer_capacity_dayahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_weekahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_monthahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_yearahead(country_code_from, country_code_to, start, end) +client.query_intraday_offered_capacity(country_code_from, country_code_to, start, end,implicit=True) +client.query_offered_capacity(country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True) +client.query_aggregate_water_reservoirs_and_hydro_storage(country_code, start, end) + +# methods that return Pandas DataFrames +client.query_load(country_code, start=start,end=end) +client.query_load_forecast(country_code, start=start,end=end) +client.query_load_and_forecast(country_code, start=start, end=end) +client.query_generation_forecast(country_code, start=start,end=end) +client.query_wind_and_solar_forecast(country_code, start=start,end=end, psr_type=None) +client.query_generation(country_code, start=start,end=end, psr_type=None) +client.query_generation_per_plant(country_code, start=start,end=end, psr_type=None) +client.query_installed_generation_capacity(country_code, start=start,end=end, psr_type=None) +client.query_installed_generation_capacity_per_unit(country_code, start=start,end=end, psr_type=None) +client.query_imbalance_prices(country_code, start=start,end=end, psr_type=None) +client.query_contracted_reserve_prices(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_contracted_reserve_amount(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_unavailability_of_generation_units(country_code, start=start,end=end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_of_production_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_transmission(country_code_from, country_code_to, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_withdrawn_unavailability_of_generation_units(country_code, start, end) +client.query_import(country_code, start, end) +client.query_generation_import(country_code, start, end) +client.query_procured_balancing_capacity(country_code, start, end, process_type, type_marketagreement_type=None) + +``` +#### Dump result to file +See a list of all IO-methods on https://pandas.pydata.org/pandas-docs/stable/io.html +```python +ts = client.query_day_ahead_prices(country_code, start=start, end=end) +ts.to_csv('outfile.csv') +``` + +### Mappings +These lists are always evolving, so let us know if something's inaccurate! + +All mappings can be found in ```mappings.py``` [here](https://github.com/EnergieID/entsoe-py/blob/master/entsoe/mappings.py) + +For bidding zone that have changed (splitted/merged) some codes are only valid for certain times. The below table shows these cases. + +| | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | +| -- | -- | -- | -- | -- | -- | -- | -- | +| DE_AT_LU | yes | yes | yes | yes | No Value | No Value | No Value | +| DE | No Value | No Value | No Value | No Value | No Value | No Value | No Value | +| DE_LU | No Value | No Value | No Value | yes | yes | yes | yes | +| AT | No Value | No Value | No Value | yes | yes | yes | yes | + + +%package -n python3-entsoe-py +Summary: A python API wrapper for ENTSO-E +Provides: python-entsoe-py +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-entsoe-py +# entsoe-py +Python client for the ENTSO-E API (european network of transmission system operators for electricity) + +Documentation of the API found on https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html + +## Installation +`python3 -m pip install entsoe-py` + +## Usage +The package comes with 2 clients: +- [`EntsoeRawClient`](#EntsoeRawClient): Returns data in its raw format, usually XML or a ZIP-file containing XML's +- [`EntsoePandasClient`](#EntsoePandasClient): Returns data parsed as a Pandas Series or DataFrame +### <a name="EntsoeRawClient"></a>EntsoeRawClient +```python +from entsoe import EntsoeRawClient +import pandas as pd + +client = EntsoeRawClient(api_key=<YOUR API KEY>) + +start = pd.Timestamp('20171201', tz='Europe/Brussels') +end = pd.Timestamp('20180101', tz='Europe/Brussels') +country_code = 'BE' # Belgium +country_code_from = 'FR' # France +country_code_to = 'DE_LU' # Germany-Luxembourg +type_marketagreement_type = 'A01' +contract_marketagreement_type = 'A01' + +# methods that return XML +client.query_day_ahead_prices(country_code, start, end) +client.query_net_position(country_code, start, end, dayahead=True) +client.query_load(country_code, start, end) +client.query_load_forecast(country_code, start, end) +client.query_wind_and_solar_forecast(country_code, start, end, psr_type=None) +client.query_generation_forecast(country_code, start, end) +client.query_generation(country_code, start, end, psr_type=None) +client.query_generation_per_plant(country_code, start, end, psr_type=None) +client.query_installed_generation_capacity(country_code, start, end, psr_type=None) +client.query_installed_generation_capacity_per_unit(country_code, start, end, psr_type=None) +client.query_crossborder_flows(country_code_from, country_code_to, start, end) +client.query_scheduled_exchanges(country_code_from, country_code_to, start, end, dayahead=False) +client.query_net_transfer_capacity_dayahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_weekahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_monthahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_yearahead(country_code_from, country_code_to, start, end) +client.query_intraday_offered_capacity(country_code_from, country_code_to, start, end, implicit=True) +client.query_offered_capacity(country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True) +client.query_contracted_reserve_prices(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_contracted_reserve_amount(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_procured_balancing_capacity(country_code, start, end, process_type, type_marketagreement_type=None) +client.query_aggregate_water_reservoirs_and_hydro_storage(country_code, start, end) + +# methods that return ZIP (bytes) +client.query_imbalance_prices(country_code, start, end, psr_type=None) +client.query_unavailability_of_generation_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_of_production_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_transmission(country_code_from, country_code_to, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_withdrawn_unavailability_of_generation_units(country_code, start, end) +``` +#### Dump result to file +```python +xml_string = client.query_day_ahead_prices(country_code, start, end) +with open('outfile.xml', 'w') as f: + f.write(xml_string) + +zip_bytes = client.query_unavailability_of_generation_units(country_code, start, end) +with open('outfile.zip', 'wb') as f: + f.write(zip_bytes) +``` +#### Making another request +Is the API-call you want not in the list, you can lookup the parameters yourself in the API documentation +```python +params = { + 'documentType': 'A44', + 'in_Domain': '10YBE----------2', + 'out_Domain': '10YBE----------2' +} +response = client._base_request(params=params, start=start, end=end) +print(response.text) +``` + +### <a name="EntsoePandasClient"></a>EntsoePandasClient +The Pandas Client works similar to the Raw Client, with extras: +- Time periods that span more than 1 year are automatically dealt with +- Requests of large numbers of files are split over multiple API calls + +Please note that this client requires you to specifically set a start= and end= parameter which should be a pandas timestamp with timezone. +If not it will throw an exception +```python +from entsoe import EntsoePandasClient +import pandas as pd + +client = EntsoePandasClient(api_key=<YOUR API KEY>) + +start = pd.Timestamp('20171201', tz='Europe/Brussels') +end = pd.Timestamp('20180101', tz='Europe/Brussels') +country_code = 'BE' # Belgium +country_code_from = 'FR' # France +country_code_to = 'DE_LU' # Germany-Luxembourg +type_marketagreement_type = 'A01' +contract_marketagreement_type = "A01" + +# methods that return Pandas Series +client.query_day_ahead_prices(country_code, start=start,end=end) +client.query_net_position(country_code, start=start, end=end, dayahead=True) +client.query_crossborder_flows(country_code_from, country_code_to, start, end) +client.query_scheduled_exchanges(country_code_from, country_code_to, start, end, dayahead=False) +client.query_net_transfer_capacity_dayahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_weekahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_monthahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_yearahead(country_code_from, country_code_to, start, end) +client.query_intraday_offered_capacity(country_code_from, country_code_to, start, end,implicit=True) +client.query_offered_capacity(country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True) +client.query_aggregate_water_reservoirs_and_hydro_storage(country_code, start, end) + +# methods that return Pandas DataFrames +client.query_load(country_code, start=start,end=end) +client.query_load_forecast(country_code, start=start,end=end) +client.query_load_and_forecast(country_code, start=start, end=end) +client.query_generation_forecast(country_code, start=start,end=end) +client.query_wind_and_solar_forecast(country_code, start=start,end=end, psr_type=None) +client.query_generation(country_code, start=start,end=end, psr_type=None) +client.query_generation_per_plant(country_code, start=start,end=end, psr_type=None) +client.query_installed_generation_capacity(country_code, start=start,end=end, psr_type=None) +client.query_installed_generation_capacity_per_unit(country_code, start=start,end=end, psr_type=None) +client.query_imbalance_prices(country_code, start=start,end=end, psr_type=None) +client.query_contracted_reserve_prices(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_contracted_reserve_amount(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_unavailability_of_generation_units(country_code, start=start,end=end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_of_production_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_transmission(country_code_from, country_code_to, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_withdrawn_unavailability_of_generation_units(country_code, start, end) +client.query_import(country_code, start, end) +client.query_generation_import(country_code, start, end) +client.query_procured_balancing_capacity(country_code, start, end, process_type, type_marketagreement_type=None) + +``` +#### Dump result to file +See a list of all IO-methods on https://pandas.pydata.org/pandas-docs/stable/io.html +```python +ts = client.query_day_ahead_prices(country_code, start=start, end=end) +ts.to_csv('outfile.csv') +``` + +### Mappings +These lists are always evolving, so let us know if something's inaccurate! + +All mappings can be found in ```mappings.py``` [here](https://github.com/EnergieID/entsoe-py/blob/master/entsoe/mappings.py) + +For bidding zone that have changed (splitted/merged) some codes are only valid for certain times. The below table shows these cases. + +| | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | +| -- | -- | -- | -- | -- | -- | -- | -- | +| DE_AT_LU | yes | yes | yes | yes | No Value | No Value | No Value | +| DE | No Value | No Value | No Value | No Value | No Value | No Value | No Value | +| DE_LU | No Value | No Value | No Value | yes | yes | yes | yes | +| AT | No Value | No Value | No Value | yes | yes | yes | yes | + + +%package help +Summary: Development documents and examples for entsoe-py +Provides: python3-entsoe-py-doc +%description help +# entsoe-py +Python client for the ENTSO-E API (european network of transmission system operators for electricity) + +Documentation of the API found on https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html + +## Installation +`python3 -m pip install entsoe-py` + +## Usage +The package comes with 2 clients: +- [`EntsoeRawClient`](#EntsoeRawClient): Returns data in its raw format, usually XML or a ZIP-file containing XML's +- [`EntsoePandasClient`](#EntsoePandasClient): Returns data parsed as a Pandas Series or DataFrame +### <a name="EntsoeRawClient"></a>EntsoeRawClient +```python +from entsoe import EntsoeRawClient +import pandas as pd + +client = EntsoeRawClient(api_key=<YOUR API KEY>) + +start = pd.Timestamp('20171201', tz='Europe/Brussels') +end = pd.Timestamp('20180101', tz='Europe/Brussels') +country_code = 'BE' # Belgium +country_code_from = 'FR' # France +country_code_to = 'DE_LU' # Germany-Luxembourg +type_marketagreement_type = 'A01' +contract_marketagreement_type = 'A01' + +# methods that return XML +client.query_day_ahead_prices(country_code, start, end) +client.query_net_position(country_code, start, end, dayahead=True) +client.query_load(country_code, start, end) +client.query_load_forecast(country_code, start, end) +client.query_wind_and_solar_forecast(country_code, start, end, psr_type=None) +client.query_generation_forecast(country_code, start, end) +client.query_generation(country_code, start, end, psr_type=None) +client.query_generation_per_plant(country_code, start, end, psr_type=None) +client.query_installed_generation_capacity(country_code, start, end, psr_type=None) +client.query_installed_generation_capacity_per_unit(country_code, start, end, psr_type=None) +client.query_crossborder_flows(country_code_from, country_code_to, start, end) +client.query_scheduled_exchanges(country_code_from, country_code_to, start, end, dayahead=False) +client.query_net_transfer_capacity_dayahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_weekahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_monthahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_yearahead(country_code_from, country_code_to, start, end) +client.query_intraday_offered_capacity(country_code_from, country_code_to, start, end, implicit=True) +client.query_offered_capacity(country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True) +client.query_contracted_reserve_prices(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_contracted_reserve_amount(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_procured_balancing_capacity(country_code, start, end, process_type, type_marketagreement_type=None) +client.query_aggregate_water_reservoirs_and_hydro_storage(country_code, start, end) + +# methods that return ZIP (bytes) +client.query_imbalance_prices(country_code, start, end, psr_type=None) +client.query_unavailability_of_generation_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_of_production_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_transmission(country_code_from, country_code_to, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_withdrawn_unavailability_of_generation_units(country_code, start, end) +``` +#### Dump result to file +```python +xml_string = client.query_day_ahead_prices(country_code, start, end) +with open('outfile.xml', 'w') as f: + f.write(xml_string) + +zip_bytes = client.query_unavailability_of_generation_units(country_code, start, end) +with open('outfile.zip', 'wb') as f: + f.write(zip_bytes) +``` +#### Making another request +Is the API-call you want not in the list, you can lookup the parameters yourself in the API documentation +```python +params = { + 'documentType': 'A44', + 'in_Domain': '10YBE----------2', + 'out_Domain': '10YBE----------2' +} +response = client._base_request(params=params, start=start, end=end) +print(response.text) +``` + +### <a name="EntsoePandasClient"></a>EntsoePandasClient +The Pandas Client works similar to the Raw Client, with extras: +- Time periods that span more than 1 year are automatically dealt with +- Requests of large numbers of files are split over multiple API calls + +Please note that this client requires you to specifically set a start= and end= parameter which should be a pandas timestamp with timezone. +If not it will throw an exception +```python +from entsoe import EntsoePandasClient +import pandas as pd + +client = EntsoePandasClient(api_key=<YOUR API KEY>) + +start = pd.Timestamp('20171201', tz='Europe/Brussels') +end = pd.Timestamp('20180101', tz='Europe/Brussels') +country_code = 'BE' # Belgium +country_code_from = 'FR' # France +country_code_to = 'DE_LU' # Germany-Luxembourg +type_marketagreement_type = 'A01' +contract_marketagreement_type = "A01" + +# methods that return Pandas Series +client.query_day_ahead_prices(country_code, start=start,end=end) +client.query_net_position(country_code, start=start, end=end, dayahead=True) +client.query_crossborder_flows(country_code_from, country_code_to, start, end) +client.query_scheduled_exchanges(country_code_from, country_code_to, start, end, dayahead=False) +client.query_net_transfer_capacity_dayahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_weekahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_monthahead(country_code_from, country_code_to, start, end) +client.query_net_transfer_capacity_yearahead(country_code_from, country_code_to, start, end) +client.query_intraday_offered_capacity(country_code_from, country_code_to, start, end,implicit=True) +client.query_offered_capacity(country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True) +client.query_aggregate_water_reservoirs_and_hydro_storage(country_code, start, end) + +# methods that return Pandas DataFrames +client.query_load(country_code, start=start,end=end) +client.query_load_forecast(country_code, start=start,end=end) +client.query_load_and_forecast(country_code, start=start, end=end) +client.query_generation_forecast(country_code, start=start,end=end) +client.query_wind_and_solar_forecast(country_code, start=start,end=end, psr_type=None) +client.query_generation(country_code, start=start,end=end, psr_type=None) +client.query_generation_per_plant(country_code, start=start,end=end, psr_type=None) +client.query_installed_generation_capacity(country_code, start=start,end=end, psr_type=None) +client.query_installed_generation_capacity_per_unit(country_code, start=start,end=end, psr_type=None) +client.query_imbalance_prices(country_code, start=start,end=end, psr_type=None) +client.query_contracted_reserve_prices(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_contracted_reserve_amount(country_code, start, end, type_marketagreement_type, psr_type=None) +client.query_unavailability_of_generation_units(country_code, start=start,end=end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_of_production_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_unavailability_transmission(country_code_from, country_code_to, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None) +client.query_withdrawn_unavailability_of_generation_units(country_code, start, end) +client.query_import(country_code, start, end) +client.query_generation_import(country_code, start, end) +client.query_procured_balancing_capacity(country_code, start, end, process_type, type_marketagreement_type=None) + +``` +#### Dump result to file +See a list of all IO-methods on https://pandas.pydata.org/pandas-docs/stable/io.html +```python +ts = client.query_day_ahead_prices(country_code, start=start, end=end) +ts.to_csv('outfile.csv') +``` + +### Mappings +These lists are always evolving, so let us know if something's inaccurate! + +All mappings can be found in ```mappings.py``` [here](https://github.com/EnergieID/entsoe-py/blob/master/entsoe/mappings.py) + +For bidding zone that have changed (splitted/merged) some codes are only valid for certain times. The below table shows these cases. + +| | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | +| -- | -- | -- | -- | -- | -- | -- | -- | +| DE_AT_LU | yes | yes | yes | yes | No Value | No Value | No Value | +| DE | No Value | No Value | No Value | No Value | No Value | No Value | No Value | +| DE_LU | No Value | No Value | No Value | yes | yes | yes | yes | +| AT | No Value | No Value | No Value | yes | yes | yes | yes | + + +%prep +%autosetup -n entsoe-py-0.5.9 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-entsoe-py -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.9-1 +- Package Spec generated @@ -0,0 +1 @@ +883d853e99b241bd309620ab2938afaf entsoe-py-0.5.9.tar.gz |
