This program makes use of the Digitransit GraphQL APIs to gather realtime route data from the Helsinki HSL Transit Network.
I've built this project to gather realtime departure information from my local transit stops (accounting for delays, cancellations, route changes, etc...) to display the results in my home.
-
Fork the repository and clone it to your local machine
-
Add a
.envfile to the root folder of your project, with the following informationAPI_KEYis provided after signing up for a development account on the Digitransit PortalSTOP_IDSshould be set to your preferred HSL stop location(s). See Digitransit Documentation for details.- Supports a single stop (ex. "HSL:11235") or multiple stops in csv format (ex. "HSL:11235,HSL:81321")
API_ENDPOINT="https://api.digitransit.fi/routing/v2/hsl/gtfs/v1" API_KEY=[YOUR-API-KEY] STOP_IDS=[YOUR-STOP-IDS] -
Run the
main.pyfile from the command line
- Connect to Digitransit API to retrieve local departure information
- Track multiple STOP_ID values at the same time
- Filter to only show preferred routes from each tracked STOP_ID.
- Interface with a display technology (ex. TRMNL) running a service to update the results at regular intervals