Skip to main content

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 *

Metadata

Release files for de-travelwarning 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for de-travelwarning 0.1.0
File Size Uploaded
de-travelwarning-0.1.0.tar.gz 47.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for de-travelwarning 0.1.0
File Interpreter ABI Platform
de_travelwarning-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 145.6 kB

Release files / de-travelwarning-0.1.0.tar.gz

Download URL de-travelwarning-0.1.0.tar.gz
Size 47.0 kB
Tags Source
SHA-256 checksum
How to use checksums
faf78edda3a6fc7ba8e3b954b50ba57ee05aefb6fee708e9f3bb5edaba442f37
BLAKE2b-256 checksum
How to use checksums
7980af449ea4d7568e57563d4e54ed6a5c66dc245663e4e3a289fba74b11149b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.8

Release files / de_travelwarning-0.1.0-py3-none-any.whl

Download URL de_travelwarning-0.1.0-py3-none-any.whl
Size 98.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fa588e6f0724629a1f4b9101656841abe6254cd9203b4303b407bf350de7f81
BLAKE2b-256 checksum
How to use checksums
eeaa626e234cc6b34afed78f2781d29b9a5bc1854add6d37a4547c8d8a939c63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page