How theoehrly/fast-f1 works
FastF1 is a Python library for retrieving and analyzing Formula 1 schedules, historical results, session timing and telemetry, with Pandas-based results and plotting support. A typical workflow selects an event and session, loads session data from F1 timing sources, then analyzes or visualizes it. Separate branches provide the Ergast-compatible historical API and live-timing capture. The source index supports the broad module relationships shown; unsampled implementations are represented only where their role is documented or their path is present in the tree.
Main entry points: core.py Session data model · events.py Events and sessions · interface.py Ergast API client · _api.py F1 timing API
Components 18
User entry
- Events and sessions
fastf1/events.py - Session data model
fastf1/core.py
Data access
- F1 timing API
fastf1/_api.py - Ergast API client
fastf1/ergast/interface.py - Ergast response types
fastf1/ergast/structure.py - MV API data
fastf1/mvapi/data.py
Live timing
- SignalR client
fastf1/livetiming/client.py - Live timing data
fastf1/livetiming/data.py - F1 account authentication
fastf1/internals/f1account/__init__.py - Token management
fastf1/internals/f1account/tokens.py
Analysis and presentation
- Extended Pandas frames
fastf1/internals/pandas_base.py - Pandas extensions
fastf1/internals/pandas_extensions.py - Matplotlib plotting
fastf1/plotting/_interface.py
Shared runtime
- Cached HTTP requests
fastf1/req.py - Fuzzy matching
fastf1/internals/fuzzy.py - Parsing helpers
fastf1/internals/parsing_helpers.py - Logging and errors
fastf1/logger.py
Other components
- Python user
Connections 27
- Python user → Events and sessions: selects event
- Python user → Session data model: loads session
- Python user → Ergast API client: queries history
- Python user → SignalR client: captures live feed
- Python user → Matplotlib plotting: visualizes data
- Events and sessions → Session data model: creates sessions
fastf1/events.py - Events and sessions → F1 timing API: fetches event data
fastf1/events.py - Events and sessions → Ergast API client: queries schedules
fastf1/events.py - Session data model → F1 timing API: loads timing data
fastf1/core.py - Session data model → Ergast API client: loads historical data
fastf1/core.py - Session data model → Live timing data: uses live data
fastf1/core.py - Session data model → MV API data: uses MV data
fastf1/core.py - F1 timing API → Cached HTTP requests: requests data
fastf1/_api.py - Ergast API client → Cached HTTP requests: requests data
fastf1/ergast/interface.py - Ergast API client → Ergast response types: builds responses
fastf1/ergast/interface.py - MV API data → Cached HTTP requests: requests data
- SignalR client → F1 account authentication: gets credentials
fastf1/livetiming/client.py - F1 account authentication → Token management: gets valid token
fastf1/internals/f1account/__init__.py - SignalR client → Live timing data: records stream
- Session data model → Extended Pandas frames: returns dataframes
fastf1/core.py - Events and sessions → Extended Pandas frames: builds event frames
fastf1/events.py - Ergast API client → Extended Pandas frames: returns dataframes
fastf1/ergast/interface.py - Matplotlib plotting → Session data model: plots session data
fastf1/plotting/_interface.py - Matplotlib plotting → Fuzzy matching: matches selections
fastf1/plotting/_interface.py - F1 timing API → Parsing helpers: parses responses
fastf1/_api.py - Events and sessions → Fuzzy matching: matches names
fastf1/events.py - Extended Pandas frames → Pandas extensions: supports extensions