Skip to main content

TFL Bus Monitor - download Transport for London bus and tube arrival times

Project description

tfl_bus_monitor

Download and display Transport For London (TfL) bus arrival time information using the TfL Unified API. Includes CLI and Python usage with optional filtering and config-based setup.

Install from PyPI

pip install tfl_bus_monitor

Command-Line Usage

busstop [-h] [-t | -j] [-c CONFIG] [--route ROUTE] [--destination DESTINATION]

Options:

  • -h, --help — Show help message and exit
  • -t, --text — Print formatted text
  • -j, --json — Pretty-print JSON (default)
  • -c CONFIG, --config CONFIG — Path to custom INI config file
  • --route ROUTE — Filter results by line name or bus number
  • --destination DESTINATION — Filter results by destination name

Example

busstop --text --route 73 --destination "Ealing Broadway"

Python Usage

from tfl_bus_monitor.tfl_bus_monitor import TFLBusMonitor, get_config_path

monitor = TFLBusMonitor()
data = monitor.get_all_arrivals()
print(data)

Configuration

By default, the tool looks for a file named busstop_config.ini in:

  1. $BUSSTOP_HOME/
  2. User home directory (~/busstop_config.ini)
  3. Embedded package config directory

Example busstop_config.ini

[busstop]
stopid = 490008660N, 490004973E
num_services = 5, 3

Each stopid corresponds to a TfL StopPoint ID, and num_services indicates how many upcoming services to show per stop.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tfl_bus_monitor-0.10.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tfl_bus_monitor-0.10-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file tfl_bus_monitor-0.10.tar.gz.

File metadata

  • Download URL: tfl_bus_monitor-0.10.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for tfl_bus_monitor-0.10.tar.gz
Algorithm Hash digest
SHA256 e1522e68f8c8716992eca05af89609107eaddb861404a2a5f046eba8f8df4e7f
MD5 779a698969452a7e89798da9f3420015
BLAKE2b-256 2cadd079c11caf8aa9587d8b8b3251afac73f6f8e91eea7f6a58eaffceb97909

See more details on using hashes here.

File details

Details for the file tfl_bus_monitor-0.10-py3-none-any.whl.

File metadata

  • Download URL: tfl_bus_monitor-0.10-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for tfl_bus_monitor-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 60ba9d6709442fdccede8fff4a94ba92d944a02b407acc0c3396dd96c56652e1
MD5 2dc55d2258b44fcfd9b772869b323cc7
BLAKE2b-256 bb9d2d2fc71e578b4399429a3245eb7f5fd80287590372ca8bca8427344d8066

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page