Skip to main content

Queries for VAG public transportation time schedules

Project description


Build Status Coverage Status

A python library for generating and executing queries for the VAG public transport system

This enables users with disabilities, hackers and you to receive information from the start.vag website.

General usage

Two classes are usually used:

    import vagquery
    # Query for stations beginning with 'Schwe'
    stations = vagquery.StationQuery("Schwe").query()
    for station in stations:

    # Query for next departures of the main railway station (id: 510)
    departures = vagquery.DepartureQuery(510).query()
    for departure in departures:

Specialized usage

For repeated queries, the query object can be created and run again and again:

    dquery = vagquery.DepartureQuery(510)
    departures = dquery.query()
    # ...
    # much later
    # ...
    departures = dquery.query()

For a custom formating of the departures, the properties of a departure object can be used:

    departures = vagquery.DepartureQuery(510).query()
    for departure in departures:
        print(departure.product + " " + str(departure.latitude) + str(departure.longitude))


vagquery is licensed under the MIT license.

Project details

Download files

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

Source Distribution

vagquery-1.2.tar.gz (3.5 kB view hashes)

Uploaded source

Built Distribution

vagquery-1.2-py3-none-any.whl (3.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page