Skip to main content

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

kontakt@bund.dev

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

de-smard-0.1.0.tar.gz (41.6 kB view hashes)

Uploaded Source

Built Distribution

de_smard-0.1.0-py3-none-any.whl (49.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page