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.11.tar.gz (8.0 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.11-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tfl_bus_monitor-0.11.tar.gz
  • Upload date:
  • Size: 8.0 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.11.tar.gz
Algorithm Hash digest
SHA256 b84dfae537bc0912f2e021cafe42b4597e5f57ce86f74b7013ec35b5530d1cef
MD5 084421dbd67d62ab306b59301a3c952c
BLAKE2b-256 bfa34a8f0c625f5f0da8648bdc917196137a8ef145d476df8d64b528173df855

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tfl_bus_monitor-0.11-py3-none-any.whl
  • Upload date:
  • Size: 8.0 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 86337a7dd34580bedca25c69e5f2a80c23ac2de580bbe3a32cf8227e2f953757
MD5 e6b122080e72b099679389f3f404c681
BLAKE2b-256 91ab0a5ad91b0ddf79b61590d924b2ed3299f9053acac32a258a65debb00b3e5

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