pitlane
The itch
Following a Formula 1 session usually means a second screen running the official live timing page, or an F1 TV subscription. pitlane puts it in the terminal instead: live timing, a line showing where every car is on the lap, driver battles, standings, results and the calendar. It's one Python file with no dependencies.
What it does
pitlane live runs during practice, qualifying, sprints and races. A status banner across the top changes colour with the track status: green flag, yellow, Safety Car, virtual Safety Car, red flag, chequered. Below it, a track line draws every car as a dot on one lap, so you can see who is physically near whom, lapped cars included. Pressing g switches to a gap view that shows trains of cars and DRS fights. The timing tower has positions gained against the grid, gaps and intervals with anything under a second highlighted, last and best laps, live mini-sectors, tyres and pit stops. Pop-ups flag overtakes, pit stops, fastest laps and retirements.
Arrow keys focus a driver. Race control gives way to their battle with the cars ahead and behind, whether each gap is closing, live sectors and speed traps, their best laps ranked against the field, their full tyre history and a lap-time graph.
Outside a session, plain pitlane is a dashboard: the next race with countdowns to each session, the last podium and both championships. Other commands cover standings, the calendar, results, qualifying and sprints, for past seasons as well as the current one.
How it works
There are two data sources. Standings, results and the calendar come from the Jolpica F1 API, the community successor to Ergast, cached on disk for five minutes so it still works offline. Live timing reads Formula 1's own public timing feed, the one behind the official live timing pages, with no login.
The feed is SignalR Core, and pitlane speaks it with nothing but the standard library. It negotiates a connection token, opens a Server-Sent Events stream, sends the handshake and subscribes to ten topics, from timing data to race control messages. Updates arrive as partial patches, where a list can be updated through a dict keyed by string indexes, so a small merge function applies each one onto the session state. A background thread holds the connection while the main loop redraws a few times a second, so cars glide along the track line rather than jumping.
What got hard along the way
The feed's car coordinates sit behind an F1 TV subscription, so pitlane can't simply read where each car is. It estimates instead. In a race it takes the leader's progress through the mini-sectors and places every other car by its gap. In practice and qualifying, where gaps mean nothing, each car is placed by its own mini-sectors. The estimate is usually within a second or two of reality and drifts behind the Safety Car, when lap times change abruptly. The README says so plainly.
The terminal layout took its own care. Every string carries colour codes, so widths and truncation have to count visible characters rather than bytes. Panels keep a fixed height even when the cars bunch up, because a layout that jumps every refresh is unreadable at a few frames a second. On a wide terminal the driver panel sits beside the timing tower. On a narrow one it moves underneath and the less important columns drop out.
F1 also locks a session's archive until it ends, so the lap-time graph and "closing or dropping" trends only cover laps since pitlane started. That's a limit of the source rather than a bug, and the README documents it.
Shipping it
The first release was called boxbox. PyPI refused the name as too close to an existing box-box package, so the project, module, command, cache directory and docs were all renamed to pitlane the same day. A GitHub Actions workflow publishes to PyPI through trusted publishing whenever a GitHub release goes out, after checking that the tag matches the version in the code.
Where it stands
pitlane 0.1.0 is on PyPI, installable with pipx install pitlane or runnable once with uvx pitlane live. It was built and published in a day, on 2026-10-04, is tested on macOS, and has one star on GitHub. It's an unofficial fan project with no connection to Formula 1.