Queries for VAG public transportation time schedules
Project description
vagquery
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vagquery-1.2.tar.gz.
File metadata
- Download URL: vagquery-1.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.0 Darwin/20.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8b7b8fb0db8e9d2fdd9343d234dc0bc3ca9a5cc184e19e235dc0eb0cffcec95
|
|
| MD5 |
8ef65147145385d64366c32483c1c7d6
|
|
| BLAKE2b-256 |
64d64087f450a9135d19859f2b747f4d02d5c7ea32b0825cde6f2393f1477034
|
File details
Details for the file vagquery-1.2-py3-none-any.whl.
File metadata
- Download URL: vagquery-1.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.0 Darwin/20.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d29c367d1d5447732fc6f6c89d5a4d5f834f15761ea02815883513d7a62caddb
|
|
| MD5 |
b0f6834ffc5b53ab668abd77193b3e07
|
|
| BLAKE2b-256 |
6ace90b16ff3e00674e775de51541885766068d4f64db235a9c60fe874ea6a02
|