vag
Web-API für Echtzeitinformationen der VAG Nürnberg
This Python package is automatically generated by the OpenAPI Generator project:
- API version: v1
- Package version: 0.1.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python >= 3.6
Installation & Usage
pip install
pip install deutschland[vag]
poetry install
poetry add deutschland -E vag
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 vag
Getting Started
Please follow the installation procedure and then run the following:
import time
from deutschland import vag
from pprint import pprint
from deutschland.vag.api import abfahrten_api
from deutschland.vag.model.abfahrten_api_response import AbfahrtenAPIResponse
# Defining the host is optional and defaults to https://start.vag.de/dm
# See configuration.py for a list of all supported configuration parameters.
configuration = vag.Configuration(
host = "https://start.vag.de/dm"
)
# Enter a context with an instance of the API client
with vag.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abfahrten_api.AbfahrtenApi(api_client)
netvu = "netvu_example" # str | Netz des Verkehrsunternehmen, aktuell \"VAG\" oder \"VGN\"
haltid = "haltid_example" # str | Haltestellenkennung je nach NetVU - VGN-Kennung oder die HaltID der VAG
product = "product_example" # str | Betriebszweig der VAG Bus, Tram, UBahn, SBahn, RBahn. Querystring: product=Bus,Tram (optional)
timespan = 1 # int | Zeitfenster für die Abfrage in Minuten (?timespan=10) (optional)
timedelay = 1 # int | Zeitliche Verschiebung für die Anfrage in Minuten (?timedelay=5) (optional)
limitcount = 1 # int | Maximale Anzahl der zurückgelieferten Abfahrten (optional)
try:
# Liefert die Abfahrten zu einer bestimmten Haltestelle
api_response = api_instance.abfahrten_get1(netvu, haltid, product=product, timespan=timespan, timedelay=timedelay, limitcount=limitcount)
pprint(api_response)
except vag.ApiException as e:
print("Exception when calling AbfahrtenApi->abfahrten_get1: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://start.vag.de/dm
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AbfahrtenApi | abfahrten_get1 | GET /api/v1/abfahrten/{netvu}/{haltid} | Liefert die Abfahrten zu einer bestimmten Haltestelle |
| AbfahrtenApi | abfahrten_get2 | GET /api/v1/abfahrten/{netvu}/{haltid}/{line} | Liefert die Abfahrten zu einer bestimmten Haltestelle |
| FahrtenApi | fahrten_get | GET /api/v1/fahrten/{betriebszweig} | Liefert alle laufenden und startenden Fahrten zu dem angegebenen Betriebszweig innerhalb des angegebenen Zeitfenster. |
| FahrtenApi | fahrten_get_fahrt1 | GET /api/v1/fahrten/{betriebszweig}/{fahrtnummer} | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem aktuellen Betriebstag |
| FahrtenApi | fahrten_get_fahrt2 | GET /api/v1/fahrten/{betriebszweig}/{betriebstag}/{fahrtnummer} | Liefert die Fahrt des angegebenen Betriebszweig mit der Fahrtnummer und dem angegebenen Betriebstag |
| HaltestellenApi | haltestellen_get_by_location | GET /api/v1/haltestellen/{netvu}/location | Liefert die Liste mit den Haltestellen zu der Umkreissuche |
| HaltestellenApi | haltestellen_get_by_name | GET /api/v1/haltestellen/{netvu} | Liefert die Liste mit den Haltestellen zu dem angegebenen Haltestellenname (Optional) |
Documentation For Models
- AbfahrtDto
- AbfahrtenAPIResponse
- FahrtDto
- FahrtenAPIResponse
- FahrwegHaltepositionDto
- HaltestelleDto
- HaltestellenAPIResponse
- Metadata
Documentation For Authorization
All endpoints do not require authorization.
Author
Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in vag.apis and vag.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.vag.api.default_api import DefaultApifrom deutschland.vag.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 vag
from deutschland.vag.apis import *
from deutschland.vag.models import *
Metadata
Release files for de-vag 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| de-vag-0.1.0.tar.gz | 44.8 kB | Without provenance | Details for de-vag-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| de_vag-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for de_vag-0.1.0-py3-none-any.whl |
Total release size: 112.8 kB
Release files / de-vag-0.1.0.tar.gz
| Download URL | de-vag-0.1.0.tar.gz |
|---|---|
| Size | 44.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
488bc2b489de88b1f77bf607e7814ec175ecf9b39ff83197eb2d62570707f9fb
|
|
BLAKE2b-256 checksum How to use checksums |
ca9586c9e972ed30e9c274c53c16c9f29a89ad227aa0360d64ac74a61c292194
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.8
|
Release files / de_vag-0.1.0-py3-none-any.whl
| Download URL | de_vag-0.1.0-py3-none-any.whl |
|---|---|
| Size | 68.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c1861cfbdec06dcf7301d768f6b58adb6b56613be3328c9698d639e71e4c1f5
|
|
BLAKE2b-256 checksum How to use checksums |
d03385f5b7aaba41938509ebcb66c1a7a24c265594239673f335adb6ad4ffdc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.8
|
Security for de-vag 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.