A Darwin based python tool to track any passenger train on the UK network.
You will need to have a Rail Data Marketplace account. This is free but will require approval which can take up to a few days.
Once you have an account, you need to subscribe to the following data sources:
- Darwin Real Time Train Information
- You can also use Darwin Real Time Train Information (Push), please review which license is more suited to your use case
- Reference Data
- Query Services and Service Details
- NationalRail Knowledgebase Stations (JSON) - Prod
- Timetable - Full Refresh - Daily
- Timetable - Changes Only - Daily
Once subscribed, you will need to populate the relevant environment variables, which are listed in .env.example. For the Darwin timetables, you will need to set up a GCP bucket for these to be transferred into periodically, which can be done in the rail data marketplace (Timetable->Data Files->File Transfers). Azure and AWS are also options, but are not yet implemented in this project.
- Python environment details are outlined by pyproject.toml
- For some examples, you will need to install the packages in the 'examples' dependency group
Examples of how to use the tracker are shown in examples. These can require additional environment variables to be set if using google sheets and/or whatsapp integrations.