Open Pit Wall is a Python project for replaying previously recorded Formula 1 timing and telemetry data as a simulated live WebSocket broadcast. It is designed for testing dashboards, overlays, visualizations, and other client applications that need a realistic motorsport data feed without requiring access to live telemetry.
It combines a CLI session picker, FastF1-powered data download pipeline, cached replay files, and a replay broadcaster with channel-based subscriptions for telemetry, leaderboard, race control, weather, and lap updates.
- Interactive terminal flow for selecting a season, weekend, and session
- FastF1-backed session download and cache generation
- Local WebSocket broadcaster for replaying cached sessions
- Channel subscriptions for telemetry, leaderboard, weather, lap, and race control data
- Terminal replay controls for play, pause, seek, restart, and speed changes
- Python 3.11+
Install from the repository root:
python3 -m pip install .For local development:
python3 -m pip install -e ".[dev]"By default, Open Pit Wall stores data outside the repository:
- macOS/Linux:
~/.config/open-pit-wall - Windows:
%APPDATA%\open-pit-wall - FastF1 cache:
<app-data>/.fastf1-cache - Replay cache:
<app-data>/computed_data
You can override the root app-data directory with:
export OPEN_PIT_WALL_HOME=/path/to/open-pit-wall-dataLaunch the interactive CLI:
open-pit-wallTop-level help:
open-pit-wall --helpRun the replay broadcaster directly:
open-pit-wall replay --help
open-pit-wall replay --data-file /path/to/session.json --speed 1.0 --autoplayYou can also use the package module entrypoint:
python3 -m open_pit_wall replay --helpThe example project in examples/driver-telemetry-trace demonstrates how to connect to the WebSocket server and subscribe to telemetry channels for a single driver, then print a trace of speed, throttle, brake, and gear data for each frame.
You can run the example with:
cd examples/driver-telemetry-trace
python3 main.py --driver VERplaypauseffrwrestartspeed <value>fasterslowerstatushelpquit
| Channel | Description |
|---|---|
telemetry.drivers |
Full-field telemetry payload for all drivers on each frame. |
telemetry.drivers.{DRIVER_CODE} |
Telemetry for a single driver, for example telemetry.drivers.VER. |
telemetry.weather |
Weather snapshots when weather data is present on a frame. |
telemetry.lap |
Current lap and elapsed replay time for each frame. |
leaderboard |
Derived leaderboard snapshot including driver order and gap-to-leader distance. |
race_control |
Race control and track status messages replayed at the correct point in the session timeline. |
Example subscription request:
{
"action": "subscribe",
"channels": ["telemetry.drivers", "leaderboard", "race_control"]
}open-pit-wall/
βββ main.py
βββ pyproject.toml
βββ requirements.txt
βββ INSTALL.txt
βββ README.md
βββ LICENSE
βββ open_pit_wall/
β βββ __init__.py
β βββ __main__.py
β βββ main.py
β βββ cli_menu.py
β βββ data_loader.py
β βββ telemetry_broadcaster.py
β βββ lib/
β βββ __init__.py
β βββ season.py
β βββ time.py
β βββ tyres.py
βββ data-examples/
βββ tests/
Run tests:
python3 -m pytest -qBuild distribution artifacts:
python3 -m build- Replay cache files are stored as JSON, not pickle, to avoid unsafe deserialization.
- Older
.pklreplay/cache files are not loaded. Re-download a session to regenerate it as JSON. - Leaderboard gaps are derived from replay frame position data and can be approximate around lap transitions.
This project is licensed under the MIT License. See LICENSE.
Formula 1 and related trademarks are the property of their respective owners. This project uses previously recorded motorsport timing and telemetry data for development, experimentation, and educational purposes.
This project was built using some of the code from the F1 Race Replay project, which can be found at: https://github.com/IAmTomShaw/f1-race-replay
The original project was created to replay Formula 1 telemetry data in a visual format using Python and FastF1. This project has been created essentially as a headless version of the original, focused on providing a WebSocket feed of telemetry and race control data for client applications to consume.
Built by Tom Shaw

