Skip to main content

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

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 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 DefaultApi
  • from 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 *

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

de-vag-0.1.0.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

de_vag-0.1.0-py3-none-any.whl (68.0 kB view details)

Uploaded Python 3

File details

Details for the file de-vag-0.1.0.tar.gz.

File metadata

  • Download URL: de-vag-0.1.0.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.8

File hashes

Hashes for de-vag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 488bc2b489de88b1f77bf607e7814ec175ecf9b39ff83197eb2d62570707f9fb
MD5 30025636c8d95d916e7c5890a6779b20
BLAKE2b-256 ca9586c9e972ed30e9c274c53c16c9f29a89ad227aa0360d64ac74a61c292194

See more details on using hashes here.

File details

Details for the file de_vag-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: de_vag-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 68.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.8

File hashes

Hashes for de_vag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c1861cfbdec06dcf7301d768f6b58adb6b56613be3328c9698d639e71e4c1f5
MD5 89c8f1f0df7b02a6053c6faaade30490
BLAKE2b-256 d03385f5b7aaba41938509ebcb66c1a7a24c265594239673f335adb6ad4ffdc2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page