A command line interface to lookup train information.
- This is not ready to be used by anyone
- It does not (yet?) use the python Open API library
- This is a personal project, not affiliated with any organization, suggest you go and use the Open APIs
Uses Open Data - GO API and that page links to the API Specification.
You'll need to request an Open API key from Metrolinx which only took a couple of days to receive via email.
This code imports from the following pacakges so make sure you install those first.
requests
- to make REST callsargparse
- to parse command line argumentsjson
- to parsing response bodies
Option | Description |
---|---|
-k |
Your GO API key. See the "Before you start" section. |
-s |
The Bus Stop or Train Station being queried e.g. "AP" for Appleby. See go_api.py for the list of station codes. |