This program prompts the user to enter origin and destination BART station codes, and returns schedule and fare details from the BART Legacy API for the next three possible trips between the selected stations.
- Create and activate a virtual environment (optional, but recommended)
python -m venv venv
. venv/Scripts/activate
- Install required packages
python -m pip install -r requirements.txt
- Export BART API key environment variable with
export BART_API_KEY=[YOUR_API_KEY]
- Run with
python next_bart_trains.py
BART station codes are available here.
Please contact Andrew Desautels with any questions.