Skip to main content
The Session class is the primary interface for accessing Formula 1 session data including lap times, telemetry, weather, and results.

Session

Object for accessing session specific data. Constructor:
event
Event
required
Reference to the associated Event object
session_name
str
required
Name of this session (e.g., ‘Qualifying’, ‘Race’, ‘FP1’)
f1_api_support
bool
default:"False"
Whether the official F1 API supports this event
Sessions are usually created using fastf1.get_session() rather than instantiating directly.

Properties

event

type
Event
Reference to the associated Event object

name

type
str
Name of this session (e.g., ‘Qualifying’, ‘Race’, ‘FP1’)

date

type
pd.Timestamp
Date at which this session took place

drivers

type
list
List of all driver numbers (as strings) that participated in this session. Available after calling load().

results

type
SessionResults
Session results with driver information. Available after calling load().

laps

type
Laps
All laps from all drivers in this session. Available after calling load() with laps=True.

car_data

type
dict
Dictionary of car telemetry (Speed, RPM, etc.) keyed by driver number (string). Each value is a Telemetry object. Available after calling load() with telemetry=True.

pos_data

type
dict
Dictionary of car position data (X, Y, Z coordinates) keyed by driver number (string). Each value is a Telemetry object. Available after calling load() with telemetry=True.

weather_data

type
pd.DataFrame
DataFrame containing weather data for this session. Available after calling load() with weather=True.

session_status

type
pd.DataFrame
Session status data (Started, Finished, Aborted). Available after calling load() with laps=True.

track_status

type
pd.DataFrame
Track status data (yellow flags, red flags, etc.). Available after calling load() with laps=True.

race_control_messages

type
pd.DataFrame
Race control messages for this session. Available after calling load() with messages=True.

session_info

type
dict
Session information including meeting, session, country and circuit names and unique identifier keys.

total_laps

type
int | None
Originally scheduled number of laps for race-like sessions. Available after calling load() with laps=True.

t0_date

type
pd.Timestamp
Date timestamp marking the beginning of the data stream (when session time is zero). Available after calling load() with telemetry=True.

session_start_time

type
pd.Timedelta
Session time at which the session was started. Available after calling load() with laps=True.

Methods

load()

Load session data from the supported APIs.
laps
bool
default:"True"
Load laps and session status data
telemetry
bool
default:"True"
Load telemetry data (car_data and pos_data)
weather
bool
default:"True"
Load weather data
messages
bool
default:"True"
Load race control messages
livedata
LiveTimingData | None
default:"None"
Optional locally saved livetiming data to use as data source instead of API
Without specifying any options, all data is loaded by default. Loading all data is recommended as FastF1 uses data from multiple sources to provide the most accurate results.
Example:
import fastf1

# Load all data (default)
session = fastf1.get_session(2023, 'Monaco', 'Race')
session.load()

# Load only specific data
session = fastf1.get_session(2023, 'Monaco', 'Q')
session.load(laps=True, telemetry=False, weather=False, messages=False)

get_driver()

Get a DriverResult object containing information about a specific driver.
identifier
str
required
Driver’s three letter identifier (e.g., ‘VER’) or driver number as string
return
DriverResult
DriverResult object with driver information
Example:
session = fastf1.get_session(2023, 'Monaco', 'Race')
session.load()

# Get driver by abbreviation
ver = session.get_driver('VER')
print(ver['FullName'])  # 'Max Verstappen'

# Get driver by number
ham = session.get_driver('44')
print(ham['TeamName'])  # 'Mercedes'

get_circuit_info()

Returns additional information about the circuit hosting this event.
return
CircuitInfo | None
CircuitInfo object with corner locations, marshal lights, marshal sectors, and track map rotation. Returns None if information is unavailable.
The circuit information is manually created and not highly accurate, but it’s useful for annotating data visualizations.
Example:
session = fastf1.get_session(2023, 'Monaco', 'Race')
session.load()

circuit_info = session.get_circuit_info()
print(circuit_info.corners)

Complete Usage Example

import fastf1
import matplotlib.pyplot as plt

# Get and load a session
session = fastf1.get_session(2023, 'Monaco', 'Race')
session.load()

# Access session properties
print(f"Session: {session.event.EventName} - {session.name}")
print(f"Date: {session.date}")
print(f"Drivers: {session.drivers}")

# Access results
results = session.results
print(results[['Position', 'Abbreviation', 'TeamName']])

# Access laps
laps = session.laps
fastest_lap = laps.pick_fastest()
print(f"Fastest lap: {fastest_lap['LapTime']}")

# Access telemetry
ver_laps = laps.pick_drivers('VER')
ver_fastest = ver_laps.pick_fastest()
ver_tel = ver_fastest.get_telemetry()

# Plot speed
plt.plot(ver_tel['Distance'], ver_tel['Speed'])
plt.xlabel('Distance (m)')
plt.ylabel('Speed (km/h)')
plt.title('Verstappen Fastest Lap - Speed Trace')
plt.show()

# Access weather data
weather = session.weather_data
print(weather[['Time', 'AirTemp', 'TrackTemp', 'Rainfall']])

# Access race control messages
messages = session.race_control_messages
print(messages[['Time', 'Category', 'Message']])

Build docs developers (and LLMs) love