Was passiert auf Deutschlands Bundesstraßen? API für aktuelle Verwaltungsdaten zu Baustellen, Staus und Ladestationen. Außerdem Zugang zu Verkehrsüberwachungskameras und vielen weiteren Datensätzen.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- 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 autobahn
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 autobahn
Please follow the installation procedure and then run the following:
import time
from deutschland import autobahn
from pprint import pprint
from deutschland.autobahn.api import default_api
from deutschland.autobahn.model.closure import Closure
from deutschland.autobahn.model.closures import Closures
from deutschland.autobahn.model.electric_charging_station import ElectricChargingStation
from deutschland.autobahn.model.electric_charging_stations import ElectricChargingStations
from deutschland.autobahn.model.parking_lorries import ParkingLorries
from deutschland.autobahn.model.parking_lorry import ParkingLorry
from deutschland.autobahn.model.road_id import RoadId
from deutschland.autobahn.model.roads import Roads
from deutschland.autobahn.model.roadwork import Roadwork
from deutschland.autobahn.model.roadworks import Roadworks
from deutschland.autobahn.model.warning import Warning
from deutschland.autobahn.model.warnings import Warnings
from deutschland.autobahn.model.webcam import Webcam
from deutschland.autobahn.model.webcams import Webcams
# Defining the host is optional and defaults to https://verkehr.autobahn.de/o/autobahn
# See configuration.py for a list of all supported configuration parameters.
configuration = autobahn.Configuration(
host = "https://verkehr.autobahn.de/o/autobahn"
)
# Enter a context with an instance of the API client
with autobahn.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = default_api.DefaultApi(api_client)
station_id = "RUxFQ1RSSUNfQ0hBUkdJTkdfU1RBVElPTl9fMTczMzM=" # str |
try:
# Details zu einer Ladestation
api_response = api_instance.get_charging_station(station_id)
pprint(api_response)
except autobahn.ApiException as e:
print("Exception when calling DefaultApi->get_charging_station: %s\n" % e)
All URIs are relative to https://verkehr.autobahn.de/o/autobahn
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | get_charging_station | GET /details/electric_charging_station/{stationId} | Details zu einer Ladestation |
DefaultApi | get_closure | GET /details/closure/{closureId} | Details zu einer Sperrung |
DefaultApi | get_parking_lorry | GET /details/parking_lorry/{lorryId} | Details eines Rastplatzes |
DefaultApi | get_roadwork | GET /details/roadworks/{roadworkId} | Details einer Baustelle |
DefaultApi | get_warning | GET /details/warning/{warningId} | Details zu einer Verkehrsmeldung |
DefaultApi | get_webcam | GET /details/webcam/{webcamId} | Details einer Webcam |
DefaultApi | list_autobahnen | GET / | Liste verfügbarer Autobahnen |
DefaultApi | list_charging_stations | GET /{roadId}/services/electric_charging_station | Liste aktueller Ladestationen |
DefaultApi | list_closures | GET /{roadId}/services/closure | Liste aktueller Sperrungen |
DefaultApi | list_parking_lorries | GET /{roadId}/services/parking_lorry | Liste verfügbarer Rastplätze |
DefaultApi | list_roadworks | GET /{roadId}/services/roadworks | Liste aktueller Baustellen |
DefaultApi | list_warnings | GET /{roadId}/services/warning | Liste aktueller Verkehrsmeldungen |
DefaultApi | list_webcams | GET /{roadId}/services/webcam | Liste verfügbarer Webcams |
- Closure
- Closures
- Coordinate
- DisplayType
- ElectricChargingStation
- ElectricChargingStations
- Extent
- LatLongValue
- LorryParkingFeatureIcon
- MultilineText
- ParkingLorries
- ParkingLorry
- Point
- RoadEvent
- RoadEventAllOf
- RoadId
- RoadItem
- Roads
- Roadwork
- Roadworks
- Warning
- Warnings
- Webcam
- WebcamAllOf
- Webcams
All endpoints do not require authorization.
If the OpenAPI document is large, imports in autobahn.apis and autobahn.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.autobahn.api.default_api import DefaultApi
from deutschland.autobahn.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 autobahn
from deutschland.autobahn.apis import *
from deutschland.autobahn.models import *