Bundesnetzagentur Strommarktdaten
Project description
smard
Bundesnetzagentur Strommarktdaten
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.0.1
- Package version: 0.1.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python >= 3.6
Installation & Usage
pip install
pip install deutschland[smard]
poetry install
poetry add deutschland -E smard
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Usage
Import the package:
from deutschland import smard
Getting Started
Please follow the installation procedure and then run the following:
import time
from deutschland import smard
from pprint import pprint
from deutschland.smard.api import default_api
from deutschland.smard.model.indices import Indices
from deutschland.smard.model.time_series import TimeSeries
# Defining the host is optional and defaults to https://www.smard.de/app/chart_data
# See configuration.py for a list of all supported configuration parameters.
configuration = smard.Configuration(
host = "https://www.smard.de/app/chart_data"
)
# Enter a context with an instance of the API client
with smard.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = default_api.DefaultApi(api_client)
filter = 1223 # int | Mögliche Filter: * `1223` - Stromerzeugung: Braunkohle * `1224` - Stromerzeugung: Kernenergie * `1225` - Stromerzeugung: Wind Offshore * `1226` - Stromerzeugung: Wasserkraft * `1227` - Stromerzeugung: Sonstige Konventionelle * `1228` - Stromerzeugung: Sonstige Erneuerbare * `4066` - Stromerzeugung: Biomasse * `4067` - Stromerzeugung: Wind Onshore * `4068` - Stromerzeugung: Photovoltaik * `4069` - Stromerzeugung: Steinkohle * `4070` - Stromerzeugung: Pumpspeicher * `4071` - Stromerzeugung: Erdgas * `410` - Stromverbrauch: Gesamt (Netzlast) * `4359` - Stromverbrauch: Residuallast * `4387` - Stromverbrauch: Pumpspeicher
filter_copy = 1223 # int | Muss dem Wert von \"filter\" entsprechen. (Kaputtes API-Design)
region = "DE" # str | Land / Regelzone / Marktgebiet: * `DE` - Land: Deutschland * `AT` - Land: Österreich * `LU` - Land: Luxemburg * `DE-LU` - Marktgebiet: DE/LU (ab 01.10.2018) * `DE-AT-LU` - Marktgebiet: DE/AT/LU (bis 30.09.2018) * `50Hertz` - Regelzone (DE): 50Hertz * `Amprion`- Regelzone (DE): Amprion * `TenneT` - Regelzone (DE): TenneT * `TransnetBW` - Regelzone (DE): TransnetBW * `APG` - Regelzone (AT): APG * `Creos` - Regelzone (LU): Creos (default to "DE")
region_copy = "DE" # str | Muss dem Wert von \"region\" entsprechen. (Kaputtes API-Design)
resolution = "hour" # str | Auflösung der Daten: * `hour` - Stündlich * `quarterhour` - Viertelstündlich * `day` - Täglich * `week` - Wöchentlich * `month` - Monatlich * `year` - Jährlich (default to "hour")
timestamp = 1 # int |
try:
# Zeitreihendaten
api_response = api_instance.filter_region_filter_copy_region_copy_resolution_timestamp_json_get(filter, filter_copy, region, region_copy, resolution, timestamp)
pprint(api_response)
except smard.ApiException as e:
print("Exception when calling DefaultApi->filter_region_filter_copy_region_copy_resolution_timestamp_json_get: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://www.smard.de/app/chart_data
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | filter_region_filter_copy_region_copy_resolution_timestamp_json_get | GET /{filter}/{region}/{filterCopy}{regionCopy}{resolution}_{timestamp}.json | Zeitreihendaten |
DefaultApi | filter_region_index_resolution_json_get | GET /{filter}/{region}/index_{resolution}.json | Indizes |
Documentation For Models
Documentation For Authorization
All endpoints do not require authorization.
Author
Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in smard.apis and smard.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1: Use specific imports for apis and models like:
from deutschland.smard.api.default_api import DefaultApi
from deutschland.smard.model.pet import Pet
Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
from deutschland import smard
from deutschland.smard.apis import *
from deutschland.smard.models import *
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file de-smard-0.1.0.tar.gz
.
File metadata
- Download URL: de-smard-0.1.0.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c76ef5b8cbfbf341e0bc1eaea46742e9ade623c4d89f442c14a79d0ceefcdfd8 |
|
MD5 | 35ad3cf0bb95c0d6e0cfe079c97ad8a4 |
|
BLAKE2b-256 | 08a5f518143ddc6a2ede86918a0b038d9c238b617e62e2cb156cec53282164ed |
File details
Details for the file de_smard-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: de_smard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 49.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a022e9a3431c5273443cc9e8ffae2a53b85503120033d067562c432a181261a |
|
MD5 | 45ad2321f548158b937501ae07620044 |
|
BLAKE2b-256 | f93a91bd5908b4159c6d3e81ce5d4202dbc493a3fb08d47e8cde3248de275796 |