Skip to main content

Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle

Project description

travelwarning

Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des Auswärtigen Amtes im Rahmen der OpenData Initiative.

Deaktivierung

Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben.

Fehlerfall

Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben.

Nutzungsbedingungen

Die Nutzungsbedingungen sind auf der OpenData-Schnittstelle des Auswärtigen Amtes zu finden.

Änderungen (offizielles Changelog)

version 1.2.6 - (08.12.2021)

Es werden zusätzlich zu jedem Land Ländercodes mit jeweils zwei Buchstaben mit ausgegeben.

Die Länderkürzel werden bei /travelwarning und /travelwarning/{contentId} in einem neuen Attribut ausgegeben z.B. in: /travelwarning/199124.

version 1.2.5 (ursprünglich geplant für Ende September 2021)

content (-> Details des Reise- und Sicherheitshinweis) wurde von /travelwarning entfernt -> bitte ab jetzt /travelwarning/{contentId} nutzen um content abzufragen

flagURL (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine Flaggen mehr angeboten

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

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

Requirements.

Python >= 3.6

Installation & Usage

pip install

pip install deutschland[travelwarning]

poetry install

poetry add deutschland -E travelwarning

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 travelwarning

Getting Started

Please follow the installation procedure and then run the following:

import time
from deutschland import travelwarning
from pprint import pprint
from deutschland.travelwarning.api import default_api
from deutschland.travelwarning.model.response_address import ResponseAddress
from deutschland.travelwarning.model.response_download import ResponseDownload
from deutschland.travelwarning.model.response_warning import ResponseWarning
from deutschland.travelwarning.model.response_warnings import ResponseWarnings
# Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
# See configuration.py for a list of all supported configuration parameters.
configuration = travelwarning.Configuration(
    host = "https://www.auswaertiges-amt.de/opendata"
)



# Enter a context with an instance of the API client
with travelwarning.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    
    try:
        # Gibt die Merkblätter des Gesundheitsdienstes zurück
        api_response = api_instance.get_healthcare()
        pprint(api_response)
    except travelwarning.ApiException as e:
        print("Exception when calling DefaultApi->get_healthcare: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://www.auswaertiges-amt.de/opendata

Class Method HTTP request Description
DefaultApi get_healthcare GET /healthcare Gibt die Merkblätter des Gesundheitsdienstes zurück
DefaultApi get_representatives_country GET /representativesInCountry Gibt eine Liste der deutschen Vertretungen im Ausland zurück
DefaultApi get_representatives_germany GET /representativesInGermany Gibt eine Liste der ausländischen Vertretungen in Deutschland zurück
DefaultApi get_single_travelwarning GET /travelwarning/{contentId} Gibt einen Reise- und Sicherheitshinweis zurück
DefaultApi get_state_names GET /stateNames Gibt das Verzeichnis der Staatennamen zurück
DefaultApi get_travelwarning GET /travelwarning Gibt alle Reise- und Sicherheitshinweise zurück

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 travelwarning.apis and travelwarning.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.travelwarning.api.default_api import DefaultApi
  • from deutschland.travelwarning.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 travelwarning
from deutschland.travelwarning.apis import *
from deutschland.travelwarning.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-travelwarning-0.1.0.tar.gz (47.0 kB view hashes)

Uploaded Source

Built Distribution

de_travelwarning-0.1.0-py3-none-any.whl (98.6 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