An async Python wrapper for the VicRoads DataExchange API
Project description
VicRoads Data Exchange Python API Wrapper
This Python package provides an asynchronous API wrapper for accessing transportation updates from the VicRoads Data Exchange platform. The wrapper supports retrieval of various transportation data, including service alerts, trip updates, and vehicle positions for metro trains, buses, and trams.
Installation
You can install the package using pip:
pip install vicroads-data-exchange-api
Usage
Initialization
First, import the required modules, create a DataExchangeClient instance, and instantiate the GTFS_R class:
from vicroads_data_exchange_api import DataExchangeClient, GTFS_R
# Create a DataExchangeClient instance
client = DataExchangeClient('your_api_key_here')
# Initialize GTFS_R with the DataExchangeClient instance
gtfs_api = GTFS_R(client)
Retrieving Service Alerts
yarra_service_alerts = await gtfs_api.yarra_trams_service_alerts()
metro_train_alerts = await gtfs_api.metro_trains_service_alerts()
Retrieving Trip Updates
bus_updates = await gtfs_api.metro_bus_trip_updates()
tram_updates = await gtfs_api.yarra_trams_trip_updates()
Retrieving Vehicle Positions
train_positions = await gtfs_api.metro_trains_vehicle_positions()
tram_positions = await gtfs_api.yarra_trams_vehicle_positions()
Documentation
For further details and available methods, refer to the API Documentation.
Contributing
Feel free to contribute by opening issues or submitting pull requests. We welcome improvements, bug fixes, or additional features. License
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
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 vicroads-transport-api-0.1.2.tar.gz.
File metadata
- Download URL: vicroads-transport-api-0.1.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff260ce3f9e2f5e4a7666d32de9309f1046ae9ff8f7cd740272bbfa322c1424d
|
|
| MD5 |
55f44dd200dacfc5932becc4fd3f9065
|
|
| BLAKE2b-256 |
bb581e6a1d653c15f24cdfb0fa63405bd65f2d7d567fbf8831adcb4f5293fa93
|
File details
Details for the file vicroads_transport_api-0.1.2-py3-none-any.whl.
File metadata
- Download URL: vicroads_transport_api-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b537aabb7cc625fc1cd4fbda6606975d30d9b8cca60bba46a2108323c0e36e9b
|
|
| MD5 |
30f72e7894ae4b0f08fc931add91aa66
|
|
| BLAKE2b-256 |
f173433365f505850303c2c391999464afa097e22420e886476c9d4bb471fc08
|