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 details)

Uploaded Source

Built Distribution

de_nina-1.1.0-py3-none-any.whl (205.7 kB view details)

Uploaded Python 3

File details

Details for the file de_nina-1.1.0.tar.gz.

File metadata

  • Download URL: de_nina-1.1.0.tar.gz
  • Upload date:
  • Size: 63.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for de_nina-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d7df4dcd82613450759bda92cd874cccc1bff11bd0dbfa9b833fcce9f90e96c0
MD5 f82670a147d1cdfdaba40b3551be29bf
BLAKE2b-256 070871a0150474670dda349ce7780a3354e7349ce3a815fad0551a2571fe179b

See more details on using hashes here.

File details

Details for the file de_nina-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: de_nina-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 205.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for de_nina-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f275877207fde32e0a6112805de296ebc7fb0f33d4beb8f9170a3c103878fc4
MD5 1c22bfd2aed58174dfed2ec11380d0b8
BLAKE2b-256 af0a23f66598f00fda5938407101d883ba6af8042affe5fafb6b329fbb9812a5

See more details on using hashes here.

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