A small Textual stopwatch app with multiple timers and keyboard-first navigation.
- Python
3.13+ uv
uv syncTo install the local Git hooks:
uv run pre-commit install --hook-type pre-commit --hook-type pre-pushuv run stopwatch-tutorialFor Textual's live dev mode:
uv run textual run --dev stopwatch_tutorial.ui.app:StopwatchAppYou can also run the packaged module directly:
uv run python -m stopwatch_tutorialIf you want the command installed on your PATH, use uv tool install:
uv tool install git+https://github.com/oddrationale/stopwatch-tutorial
stopwatch-tutorialIf you want to run it without installing anything, use uvx:
uvx --from git+https://github.com/oddrationale/stopwatch-tutorial stopwatch-tutorial- Multiple independent stopwatches
- Add and remove timers from the app
- Keyboard and mouse friendly controls
Tab: move between visible stopwatch buttonsShift+Tab: move backwards through visible stopwatch buttonsEnterorSpace: press the focused buttonUp/Down: move between stopwatchesLeft/Right: move between visible buttons in the selected stopwatcha: add a stopwatchr: remove the selected stopwatchd: toggle light/dark theme
Run the project checks with:
uv run ruff check .
uv run ty check
uv run pytestThe pytest configuration enforces 100% coverage for stopwatch_tutorial.
GitHub Actions also uploads the generated coverage.xml report to Codecov.
This project uses pre-commit:
pre-commit:ruff format,ruff checkpre-push:ty check,pytest
Run all hooks manually with:
uv run pre-commit run --all-files
uv run pre-commit run --hook-stage pre-push --all-files