A terminal UI for tracking Amtrak train status with auto-refresh
Project description
amtrak-status
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
- Amtraker API by piemadd
- Rich for the beautiful TUI components
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amtrak_status-0.1.0.tar.gz.
File metadata
- Download URL: amtrak_status-0.1.0.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f827de6cab66e3f2b4e1d173a5bad770219dac47c02c6b3d9006bda905f98b8c
|
|
| MD5 |
a32a3d65d6b1d7f0ad6135b788e71929
|
|
| BLAKE2b-256 |
2d04f87baeb6eee38fd7f44174842cca1b902a898056680afbd0890e307e0064
|
Provenance
The following attestation bundles were made for amtrak_status-0.1.0.tar.gz:
Publisher:
publish.yml on theFestest/amtrak-status
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amtrak_status-0.1.0.tar.gz -
Subject digest:
f827de6cab66e3f2b4e1d173a5bad770219dac47c02c6b3d9006bda905f98b8c - Sigstore transparency entry: 928733617
- Sigstore integration time:
-
Permalink:
theFestest/amtrak-status@4f9eb27d61aa340b2795b6a2ee6c562778b2ce63 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/theFestest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4f9eb27d61aa340b2795b6a2ee6c562778b2ce63 -
Trigger Event:
release
-
Statement type:
File details
Details for the file amtrak_status-0.1.0-py3-none-any.whl.
File metadata
- Download URL: amtrak_status-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7920e917fe00aa5eec5b1dd474e11cb5cb4b75bf591c0ed5cd3c320d13eac2bc
|
|
| MD5 |
f6b6370eeb8af3d61f6f77dca23f9782
|
|
| BLAKE2b-256 |
4396b5ade4cde4fa539003f1c0cb6d099c3ed34c175a49fc805ab897194232aa
|
Provenance
The following attestation bundles were made for amtrak_status-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on theFestest/amtrak-status
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amtrak_status-0.1.0-py3-none-any.whl -
Subject digest:
7920e917fe00aa5eec5b1dd474e11cb5cb4b75bf591c0ed5cd3c320d13eac2bc - Sigstore transparency entry: 928733621
- Sigstore integration time:
-
Permalink:
theFestest/amtrak-status@4f9eb27d61aa340b2795b6a2ee6c562778b2ce63 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/theFestest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4f9eb27d61aa340b2795b6a2ee6c562778b2ce63 -
Trigger Event:
release
-
Statement type: