Python library to make use of transport information from opendata.rmv.de.
Project description
PyRMVtransport :bus:
Python library to make use of transport information from opendata.rmv.de.
Installation
$ pip install PyRMVtransport
Usage
import asyncio
import aiohttp
from RMVtransport import RMVtransport
async def main():
"""The main part of the example script."""
async with aiohttp.ClientSession():
rmv = RMVtransport()
# Get the data
try:
# Departures for station 3006907 (Wiesbaden Hauptbahnhof)
# max. 5 results
# only specified products (S-Bahn, U-Bahn, Tram)
data = await rmv.get_departures(
station_id="3006907", products=["S", "U-Bahn", "Tram"], max_journeys=5
)
# Use the JSON output
print(data)
# or pretty print
rmv.print()
except TypeError:
pass
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyRMVtransport-0.3.3.tar.gz
(39.6 kB
view details)
Built Distribution
File details
Details for the file PyRMVtransport-0.3.3.tar.gz
.
File metadata
- Download URL: PyRMVtransport-0.3.3.tar.gz
- Upload date:
- Size: 39.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 921a43a4eef5abd8b7f010a5815a6eb609d8ba9f93ef385a18dd8ebba5b65141 |
|
MD5 | d821e4b6b59b8d8c1f4a7f1c02943a33 |
|
BLAKE2b-256 | d01afbcb638a15872d59a158eed9da6f73f288ab535438eecf0abf3e0a90b1d4 |
File details
Details for the file PyRMVtransport-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: PyRMVtransport-0.3.3-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dd3b76cfdcae0a298113fd0893403afb86cfd82febefe9a1496610133193cdb |
|
MD5 | b7b40e7e2aa51469bdc218c269f9c58d |
|
BLAKE2b-256 | f542ec4c0fa4f1f6849140305082542b43894515242f7ed8cf9cb5f65120f9fb |