Skip to main content

Bundesamt für Bevölkerungsschutz: NINA API

Project description

nina

Erhalten Sie wichtige Warnmeldungen des Bevölkerungsschutzes für Gefahrenlagen wie zum Beispiel Gefahrstoffausbreitung oder Unwetter per Programmierschnittstelle.

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

  • API version: 1.0.0
  • Package version: 1.1.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://warnung.bund.de/

Requirements.

Python >= 3.6

Installation & Usage

pip install

pip install deutschland[nina]

poetry install

poetry add deutschland -E nina

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 nina

Getting Started

Please follow the installation procedure and then run the following:

import time
from deutschland import nina
from pprint import pprint
from deutschland.nina.api import archive_api
from deutschland.nina.model.archive_warning_history import ArchiveWarningHistory
from deutschland.nina.model.warning import Warning
# Defining the host is optional and defaults to https://warnung.bund.de/api31
# See configuration.py for a list of all supported configuration parameters.
configuration = nina.Configuration(
    host = "https://warnung.bund.de/api31"
)



# Enter a context with an instance of the API client
with nina.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = archive_api.ArchiveApi(api_client)
    identifier = "mow.DE-NI-OL-W015-20230121-002" # str | Meldungs-ID

    try:
        # Gesammelter Verlauf einer MOWAS Warnung
        api_response = api_instance.get_full_warning_history(identifier)
        pprint(api_response)
    except nina.ApiException as e:
        print("Exception when calling ArchiveApi->get_full_warning_history: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://warnung.bund.de/api31

Class Method HTTP request Description
ArchiveApi get_full_warning_history GET /archive.mowas/{identifier}-mapping.json Gesammelter Verlauf einer MOWAS Warnung
ArchiveApi get_warning_history GET /archive.mowas/{identifier}.json Abruf einer archivierten MOWAS Warnung
CovidApi get_ars_covid_rules GET /appdata/covid/covidrules/DE/{ARS}.json Corona Regelungen nach ARS
CovidApi get_covid_infos GET /appdata/covid/covidinfos/DE/covidinfos.json Allgemeine Informationen zu Corona
CovidApi get_covid_map GET /appdata/covid/covidmap/DE/covidmap.json Kartendaten für Corona-Fallzahlen.
CovidApi get_covid_ticker GET /appdata/covid/covidticker/DE/covidticker.json Covid-Ticker
CovidApi get_covid_ticker_message GET /appdata/covid/covidticker/DE/tickermeldungen/{id}.json Detailinformationen zu Covid-Ticker Meldungen
WarningsApi get_biwapp_map_data GET /biwapp/mapData.json Biwapp Meldungen
WarningsApi get_dashboard GET /dashboard/{ARS}.json Meldungsübersicht nach ARS
WarningsApi get_dwd_map_data GET /dwd/mapData.json Unwetterwarnungen des Deutschen Wetterdienstes
WarningsApi get_katwarn_map_data GET /katwarn/mapData.json Katwarn Meldungen
WarningsApi get_lhp_map_data GET /lhp/mapData.json Meldungen des Länderübergreifenden Hochwasserportals
WarningsApi get_mowas_map_data GET /mowas/mapData.json Mowas Meldungen
WarningsApi get_police_map_data GET /police/mapData.json Polizeimeldungen
WarningsApi get_warning GET /warnings/{identifier}.json Detailinformation zu einer Warnung
WarningsApi get_warning_geo_json GET /warnings/{identifier}.geojson GeoJSON informationen zu einer Warnung.
DefaultApi get_data_version GET /dynamic/version/dataVersion.json Liefert die Versionsnummer.
DefaultApi get_event_code GET /appdata/gsb/eventCodes/{filename} Event Code Bilddateien.
DefaultApi get_event_codes GET /appdata/gsb/eventCodes/eventCodes.json Liefert Event Codes und Name der Bilddateien.
DefaultApi get_faqs GET /appdata/gsb/faqs/DE/faq.json FAQs
DefaultApi get_logo GET /appdata/gsb/logos/{filename} Logo-Bilddateien.
DefaultApi get_logos GET /appdata/gsb/logos/logos.json Liefert Namen und Logos für Sender-IDs
DefaultApi get_notfalltipps GET /appdata/gsb/notfalltipps/DE/notfalltipps.json Notfalltipps

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 nina.apis and nina.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.nina.api.default_api import DefaultApi
  • from deutschland.nina.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 nina
from deutschland.nina.apis import *
from deutschland.nina.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_nina-1.1.0.tar.gz (63.9 kB view hashes)

Uploaded Source

Built Distribution

de_nina-1.1.0-py3-none-any.whl (205.7 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