Skip to main content

F1-Replay — Interactive Formula 1 Race Replay & Circuit Visualization

PyPI version Python 3.9+ License: MIT Documentation

Replay any historic Formula 1 race as an animated 2D map with real telemetry data, live timing, strategy overlays, and circuit visualizations. Built on FastF1 with intelligent caching and a Flask-based viewer.

Why F1-Replay?

  • Watch any race — Animated car positions on a real circuit map with sub-second telemetry
  • Live timing overlay — Gap times, position changes, pit stops, and tyre strategy in real time
  • Track status — Safety car, VSC, red flag overlays and rain effects rendered on canvas
  • Circuit posters — Generate publication-quality circuit maps colored by speed, sectors, throttle, brake, or elevation
  • One command — f1-replay 2024 monaco and you're watching the race in your browser
  • Python API — Full programmatic access to seasons, weekends, sessions, and telemetry DataFrames (Polars)

Quick Start

pip install f1-replay

Race Replay

from f1_replay import Manager

mgr = Manager()
mgr.race(2024, "monaco")

Or from the command line:

f1-replay 2024 monaco

Opens an interactive viewer at http://localhost:8080 with animated car positions, live standings, strategy panel, race control messages, and more.

Circuit Plotting

mgr = Manager()
weekend = mgr.load_weekend(2024, "monaco")

weekend.plot()                        # Clean white track
weekend.plot(color_mode="speed")      # Colored by speed
weekend.plot(color_mode="sectors")    # Marshal sectors
weekend.plot(save_path="monaco.png")  # Save to file

Color modes: white, sectors, speed, throttle, brake, height

CLI

f1-replay 2024 monaco                  # Race replay (shorthand)
f1-replay 2024 8                       # By round number
f1-replay race 2024 monaco -p 9000     # Custom port
f1-replay seasons 2024                 # List races
f1-replay config --set-cache-dir /data # Set cache location

Documentation

Full documentation at f1-replay.readthedocs.io

Development

git clone https://github.com/kkollsga/f1-replay.git && cd f1-replay
make install   # pip install -e ".[dev,all]"
make check     # lint + tests (196 tests)
make docs      # build Sphinx documentation

See CONTRIBUTING.md for the full development guide.

License

MIT

Metadata

Release files for f1-replay 0.1.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for f1-replay 0.1.20
File Size Uploaded Provenance
f1_replay-0.1.20.tar.gz 166.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for f1-replay 0.1.20
File Interpreter ABI Platform
f1_replay-0.1.20-py3-none-any.whl Python 3 none any Details

Total release size: 330.6 kB

Release files / f1_replay-0.1.20.tar.gz

Download URL f1_replay-0.1.20.tar.gz
Size 166.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5a8856ab535c2d4de6f74e209e523c15ccb0578b12071ec803b41eadd1e1b6cd
BLAKE2b-256 checksum
How to use checksums
723ead57ef7b1cb8a15d1caf94009f8ee1647fe2712ffca39377fc7fe75ff2e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / f1_replay-0.1.20-py3-none-any.whl

Download URL f1_replay-0.1.20-py3-none-any.whl
Size 163.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33aeb1b73a56f79589dee1c04e97c842d0587d7ae17e7766d5f8fa679669d681
BLAKE2b-256 checksum
How to use checksums
0404caa0f2dcbea96715706bb8507ab1a5f0817288f95cc939a14fece4f5fd54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for f1-replay 0.1.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page