A lightweight desktop widget that shows live NBA game status, scores, play-by-play, and box scores.
This repository provides a small PyQt5 application that fetches live NBA data and displays it in a compact, themeable UI.
- Live scoreboard and game details
- Compact, resizable desktop UI built with PyQt5
- Light/dark themes
- Box score and recent plays per game
- Local team logo support (fast lookup and in-memory caching)
Prerequisites: Python 3.8+, system packages required for PyQt5 (install via your distro package manager if necessary).
- Create a virtual environment and run the app (recommended):
# from project root
./run_venv.sh- The script creates
.venv/, installs packages fromrequirements.txt, and launches the application.
- Python 3.8+
- PyQt5
- nba_api
- python-dateutil
- requests
All Python packages are listed in requirements.txt.
- To run with a specific Python interpreter, set the
PYTHONenv var:PYTHON=python3.11 ./run_venv.sh - The app attempts to preload logo images into memory for common sizes on startup. If PyQt5 is not installed at preload time, the app will still find file paths and load images on demand.
- If the UI fails to start, ensure system Qt libraries are installed (Ubuntu:
sudo apt install libxcb-xinerama0 libxkbcommon-x11-0or install thepython3-pyqt5package). - If logos do not display: check
nba-logos/for correct filenames and supported image formats. - For API failures, verify network access and consider adding retries or adjusting cache timeouts.
- The codebase separates responsibilities (UI widgets, logo utilities, services). Add tests for pure helpers (e.g., filename matching) using pytest.
- Keep UI code in
app.pyand widget components in separate modules for easier maintenance.
This project uses data from public NBA APIs. Confirm any licensing requirements for redistribution of logos or API usage before publishing broadly.