Installation

Getting started

Installation

Install lapbox from PyPI, add the charts extra, and get session data from FastF1.

Install from PyPI

Shell
pip install lapbox

lapbox needs Python 3.11 or newer and brings its four dependencies with it:

PackageVersionUsed for
FastF1≥ 3.4Loading sessions (lapbox reads what it loads)
pandas≥ 2.1Every table in and out
NumPy≥ 1.26The numerics
SciPy≥ 1.11Peak finding: corner apexes and segment boundaries

A virtual environment keeps it apart from other projects:

Shell
python -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate
pip install lapbox

With charts

The figures in lapbox.plot need Plotly, which comes with the plot extra:

Shell
pip install "lapbox[plot]"

The quotes keep shells such as zsh from reading the brackets. To save figures as PNG or SVG, also install kaleido; HTML needs nothing extra.

Check the install

Python
import lapbox

print(lapbox.__version__)
Output
0.1.0

Getting session data

lapbox downloads nothing: it analyses what FastF1 loads. FastF1 caches every download, so a session is fetched once and loads quickly after that. To choose the cache folder:

Python
import fastf1

fastf1.Cache.enable_cache("f1-cache")  # any folder; it must exist
session = fastf1.get_session(2025, "Monza", "R")
session.load()

FastF1 3.9 still accepts enable_cache but warns that it is deprecated; the new spelling is fastf1.Cache.configure(cache_dir="f1-cache").

Load only what you need — races analysed with lapbox.pace and lapbox.tyres don’t need telemetry, so session.load(telemetry=False, weather=False, messages=False) is much quicker.

If session.load() logs “Failed to load timing data” and session.laps then raises DataNotLoadedError, this is why — see Troubleshooting.

Working on lapbox itself

Shell
git clone https://github.com/racemind-ai/lapbox-sdk.git
cd lapbox-sdk
pip install -e ".[dev]"
ruff check . && black --check . && pytest

The tests are synthetic and run offline: no FastF1 download, no network. CI runs them on Python 3.11 and 3.12. Bugs and ideas go to GitHub issues.

These docs describe lapbox 0.1.0. Something wrong or missing? Open an issue.