Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des Auswärtigen Amtes im Rahmen der OpenData Initiative.
Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben.
Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben.
Die Nutzungsbedingungen sind auf der OpenData-Schnittstelle des Auswärtigen Amtes zu finden.
content
(-> Details des Reise- und Sicherheitshinweis) wurde von/travelwarning
entfernt -> bitte ab jetzt/travelwarning/{contentId}
nutzen umcontent
abzufragen
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.1
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python >= 3.6
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 travelwarning
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 travelwarning
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)
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 |
- AdressListe
- Adresse
- Artikel
- Download
- Reisewarnung
- ReisewarnungZusammenfassung
- ResponseAddress
- ResponseAddressResponse
- ResponseArtikel
- ResponseArtikelResponse
- ResponseDownload
- ResponseDownloadResponse
- ResponseWarning
- ResponseWarningResponse
- ResponseWarnings
- ResponseWarningsResponse
All endpoints do not require authorization.
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 *