Skip to main content

Queries for VAG public transportation time schedules

Project description

===== vagquery

Build Status Coverage Status

A python library for generating and executing queries for the VAG public transport system start.vag.de

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:
        print(station)


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

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))

License

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.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

vagquery-1.1-py2.py3-none-any.whl (7.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file vagquery-1.1.tar.gz.

File metadata

  • Download URL: vagquery-1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.7.1 Darwin/18.2.0

File hashes

Hashes for vagquery-1.1.tar.gz
Algorithm Hash digest
SHA256 34bc62d9610490fb3dbb6f9b08db77aec61e215f202ff7b767f7a0e20668a9b2
MD5 9b3917792c38309b18503a45d1ec32a7
BLAKE2b-256 aef0ef6a6da60014d1b09b28dee22c3644c525aa43a6d2ac916fa26014ee3259

See more details on using hashes here.

File details

Details for the file vagquery-1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: vagquery-1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.7.1 Darwin/18.2.0

File hashes

Hashes for vagquery-1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 35edd45f0f0e2f2a955393e6b05fa82081c1cfaedbb19074eb60980c44707f95
MD5 ba3dd8398d492035b12e3c4f680ab6e1
BLAKE2b-256 592b4dc4c1db73d334c7b13dfc2cd7b5088b69bd99a16f0b86655dcca03a544e

See more details on using hashes here.

Supported by

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