dwd

October 9, 2021 · View on GitHub

Aktuelle Wetterdaten von allen Deutschen Wetterstationen

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/bundesAPI/deutschland.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/bundesAPI/deutschland.git)

Then import the package:

from deutschland import dwd

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

from deutschland import dwd

Getting Started

Please follow the installation procedure and then run the following:


import time
from deutschland import dwd
from pprint import pprint
from deutschland.dwd.api import default_api
from deutschland.dwd.model.crowd_meldung import CROWDMeldung
from deutschland.dwd.model.error import Error
from deutschland.dwd.model.gemeinde_warnings import GemeindeWarnings
from deutschland.dwd.model.station_overview import StationOverview
from deutschland.dwd.model.warning_coast import WarningCoast
from deutschland.dwd.model.warning_nowcast import WarningNowcast
# Defining the host is optional and defaults to https://app-prod-ws.warnwetter.de/v30
# See configuration.py for a list of all supported configuration parameters.
configuration = dwd.Configuration(
    host = "https://app-prod-ws.warnwetter.de/v30"
)



# Enter a context with an instance of the API client
with dwd.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    
    try:
        # Alpen Wettervorhersage als Text
        api_response = api_instance.alpen_forecast_text_dwms_json_get()
        pprint(api_response)
    except dwd.ApiException as e:
        print("Exception when calling DefaultApi->alpen_forecast_text_dwms_json_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://app-prod-ws.warnwetter.de/v30

ClassMethodHTTP requestDescription
DefaultApialpen_forecast_text_dwms_json_getGET /alpen_forecast_text_dwms.jsonAlpen Wettervorhersage als Text
DefaultApicrowd_meldungen_overview_v2_json_getGET /crowd_meldungen_overview_v2.jsonDWD Crowdwettermeldungen
DefaultApigemeinde_warnings_v2_en_json_getGET /gemeinde_warnings_v2_en.jsonGemeinde Unwetterwarnungen
DefaultApisea_warning_text_json_getGET /sea_warning_text.jsonHochsee Unwetterwarnungen als Text
DefaultApistation_overview_extended_getGET /stationOverviewExtendedWetterstation Daten
DefaultApiwarnings_coast_en_json_getGET /warnings_coast_en.jsonKüsten Unwetterwarnungen (englisch)
DefaultApiwarnings_coast_json_getGET /warnings_coast.jsonKüsten Unwetterwarnungen (deutsch)
DefaultApiwarnings_lawine_json_getGET /warnings_lawine.jsonAlpen Wettervorhersage als Text
DefaultApiwarnings_nowcast_en_json_getGET /warnings_nowcast_en.jsonNowcast Warnungen (englisch)
DefaultApiwarnings_nowcast_json_getGET /warnings_nowcast.jsonNowcast Warnungen (deutsch)

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 dwd.apis and dwd.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.dwd.api.default_api import DefaultApi
  • from deutschland.dwd.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 dwd
from deutschland.dwd.apis import *
from deutschland.dwd.models import *