Skip to main content

A terminal UI for tracking Amtrak train status with auto-refresh

Project description

amtrak-status

PyPI Tests Changelog License

A clean terminal user interface (TUI) for tracking Amtrak train status in real-time. No more manual page refreshing!

Features

  • Auto-refresh: Automatically updates every 30 seconds (configurable)
  • Visual progress bar: See journey completion at a glance
  • Station-by-station breakdown: Scheduled, estimated, and actual times
  • Color-coded status: Green for early/on-time, red for late, yellow for en-route
  • Clean TUI: Built with Rich for a beautiful terminal experience

Installation

Using uv (recommended)

# Run directly without installing
uv run --with amtrak-status amtrak-status 42

# Or install as a project
uv sync
uv run amtrak-status 42

Using pip

pip install amtrak-status
amtrak-status 42

Usage

# Track the Pennsylvanian #42
amtrak-status 42

# Track the California Zephyr #5
amtrak-status 5

# Track with custom refresh interval (60 seconds)
amtrak-status 42 -r 60

# Display once and exit (no auto-refresh)
amtrak-status 42 --once

# Track a specific day's train (train 42 from the 26th)
amtrak-status 42-26

Options

Option Description
train_number Amtrak train number (e.g., 42, 5, 91)
-r, --refresh Refresh interval in seconds (default: 30)
--once Display once and exit without auto-refresh

Common Train Numbers

Number Route
42 Pennsylvanian (Pittsburgh → NYC)
43 Pennsylvanian (NYC → Pittsburgh)
5 California Zephyr (Chicago → Emeryville)
6 California Zephyr (Emeryville → Chicago)
91 Silver Star (NYC → Miami)
92 Silver Star (Miami → NYC)
79/80 Carolinian
19/20 Crescent

How It Works

This tool uses the Amtraker API, a community-built API that provides real-time Amtrak train tracking data. The API pulls from Amtrak's official Track Your Train system.

Troubleshooting

"Train Not Found"

  • The train may not have started its journey yet today
  • Double-check the train number on Amtrak's website
  • The train may have already completed its journey

No updates showing

  • The Amtraker API updates when Amtrak's system updates (typically every few minutes)
  • Check your internet connection

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd amtrak-status
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

python -m pip install -e '.[test]'

To run the tests:

python -m pytest

License

Apache-2.0

Credits

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

amtrak_status-0.1.3.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

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

amtrak_status-0.1.3-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file amtrak_status-0.1.3.tar.gz.

File metadata

  • Download URL: amtrak_status-0.1.3.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for amtrak_status-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5bd375e30341545df84a5acb7cca2c4fabfa5e1f7b674969914568408fd4fd16
MD5 6f0699031c8dd65d330b8c3107124e53
BLAKE2b-256 9f4724af512c00e6b3e09b0fb3e542d842d96e867a6a3d0e16273ef9a900c2b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for amtrak_status-0.1.3.tar.gz:

Publisher: publish.yml on theFestest/amtrak-status

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file amtrak_status-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: amtrak_status-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for amtrak_status-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 75cbfed8dc007a27b4bb8f28dc605dff0d89d70f0a3c2cba30be76494a05938e
MD5 cf5539e822829e32e0c7de1b56d5bb31
BLAKE2b-256 745cb88da6adbf01d455e370141e2defbe1f855f6d015e89ec3ee017c78b40e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for amtrak_status-0.1.3-py3-none-any.whl:

Publisher: publish.yml on theFestest/amtrak-status

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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