A real-time Vienna public transport monitoring desktop widget that displays live departure times for U-Bahn, trams, and buses.
- Real-time Departures: Live countdown timers for all Vienna public transport
- Multiple Stations: Monitor several stations simultaneously
- Always-on-Top Widget: Stays visible while you work
- Line Filtering: Choose specific lines and directions per station
- System Tray Integration: Minimize to tray for clean desktop
- Authentic Line Colors: Uses official Wiener Linien branding
- Secure & Robust: Enterprise-grade error handling and security
- Python 3.8 or higher
- Windows, macOS, or Linux
-
Clone the repository:
git clone https://github.com/yourusername/wien-ticker.git cd wien-ticker -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
- Click the settings icon (⚙️) in the header or right-click → Settings
- Search for your station (e.g., "Hietzing")
- Select the station from search results
- Choose which lines and directions to monitor
- Click "Add Station"
The main window will update within 30 seconds to show your new station.
- Remove Station: Select station in settings and click "Remove Station"
- Filter Lines: When adding a station, select specific lines to monitor
- Reposition Window: Drag the header to move the window anywhere on screen
- Minimize to Tray: Close the window (X button) to hide to system tray
- Restore: Click the tray icon → Show
- Quick Settings: Right-click tray icon → Settings
- Exit: Right-click tray icon → Exit
Configuration is stored in config.json:
{
"stations": [
{
"name": "Hietzing U",
"diva": "60201332",
"lines": [
{"line": "58A", "towards": "Hietzing U"}
]
}
]
}You can edit config.json directly if needed:
diva: Station ID from Wiener Linien APIlines: Array of line filters (omit to show all lines)
wien-ticker/
├── main.py # Main application & GUI
├── settings_ui.py # Settings window
├── station_search.py # Station search utilities
├── file_lock.py # Cross-platform file locking
├── config.json # User configuration
├── requirements.txt # Python dependencies
├── logs/ # Application logs
│ └── wien-ticker.log
└── assets/ # Icons and images
├── icon.png
├── close.png
└── settings.png
- Main App (
main.py): Always-on-top widget with 30-second refresh - Settings UI (
settings_ui.py): Station management interface (separate process) - File Locking (
file_lock.py): Prevents config corruption during concurrent access - Logging: Rotating logs (1MB max, 5 backups)
✅ Specific Exception Handling: No bare except: blocks
✅ HTTPS Verification: All API calls validate SSL certificates
✅ File Locking: Prevents config corruption
✅ Thread Safety: Lock-based synchronization
✅ Subprocess Validation: Path traversal prevention
✅ Exponential Backoff: API rate limiting with jitter
Wien-Ticker uses the official Wiener Linien Open Government Data (OGD) API:
- Realtime Monitor API:
https://www.wienerlinien.at/ogd_realtime/monitor - Station Data CSV:
https://data.wien.gv.at/csv/wienerlinien-ogd-haltestellen.csv
Rate limiting is handled automatically with exponential backoff (30s → 600s max).
- Check your internet connection
- Verify
config.jsoncontains valid station data - Check
logs/wien-ticker.logfor error messages
This means the Wiener Linien API is temporarily down. The app will automatically retry with exponential backoff.
Another process is accessing config.json. Wait a moment and try again. If persistent:
- Close all Wien-Ticker windows
- Restart the application
Changes take up to 30 seconds to appear. The app polls config.json every refresh cycle.
# Install development dependencies
pip install -r requirements.txt
# Run the main application
python main.py
# Run settings window directly
python settings_ui.py- Type Hints: Functions include type annotations
- Logging: Comprehensive logging with rotation
- Error Handling: Specific exception types throughout
- Constants: Magic numbers extracted to named constants
# Syntax check all Python files
python -m py_compile main.py settings_ui.py station_search.py file_lock.pyContributions are welcome! Please feel free to submit a Pull Request.
- Real-time config detection (replace 30s polling)
- Prevent multiple settings windows
- Add visual loading states
- Duplicate station prevention
- Create executable with PyInstaller
This repository is provided for informational and experimental purposes only. The code is offered “as is”, without any warranties of any kind, express or implied. I make no guarantees regarding its correctness, reliability, or suitability for any purpose. Use of this code is entirely at your own risk. I assume no responsibility or liability for any damages, losses, or issues arising from its use, misuse, or inability to use the contents of this repository.
- Wiener Linien: For providing the open data API
- Vienna Open Data: For station information CSV
- ⏱️ Real-time config updates (watchdog)
- 🔒 Singleton settings window
- 📊 Visual loading indicators
- 🚫 Duplicate station prevention
- 📦 Standalone executable (PyInstaller)
- 🎨 Customizable themes
- ⚙️ UI-based settings (refresh interval, etc.)
- 🔔 Desktop notifications for delays
For bugs or feature requests, please open an issue on GitHub.
Made with ❤️ for Vienna commuters