Gobble is a service that reads the MBTA V3 Streaming API for all train/bus events, and writes them out to a format that can be understood by the TransitMatters Data Dashboard.
uvwith Python 3.12- Ensure
uvis using the correct Python version by runninguv venv --python 3.12
- Ensure
- Duplicate
config/template.jsonintoconfig/local.json, and change the null out with your MBTA V3 API key. - In the root directory, run
uv sync --group devto install dependencies followed byuv run pre-commit installto install pre-commit hooks - Run
uv run src/gobble.pyto start. - Output will be in
data/in your current working directory. Good luck!
You can run the linter against any code changes with the following commands
$ uv run ruff check --fix src
$ uv run ruff format srcIf you've found this app helpful or interesting, please consider donating to TransitMatters to help support our mission to provide data-driven advocacy for a more reliable, sustainable, and equitable transit system in Metropolitan Boston.
