Skip to main content
FastF1 organizes Formula 1 data around the concepts of Events (race weekends) and Sessions (individual practice, qualifying, or race sessions). This page covers how to access and work with these fundamental objects.

Overview

The typical workflow for loading F1 data starts with identifying an event and session:

Getting a Session

The primary entry point is get_session(), which returns a Session object based on year, event, and session identifier.

Function: get_session()

int
required
Championship year (e.g., 2021, 2023)
str | int
required
Event name as a string or round number as an integer. String matching uses fuzzy search by default.Examples: 'bahrain', 'Silverstone', 1 (first round)
int | str | None
Session identifier - can be:
  • Session name: 'Race', 'Qualifying', 'Practice 1'
  • Abbreviation: 'R', 'Q', 'FP1', 'FP2', 'FP3', 'S' (Sprint), 'SQ' (Sprint Qualifying)
  • Session number: 1, 2, 3, 4, 5
Literal['fastf1', 'f1timing', 'ergast'] | None
Data source backend:
  • 'fastf1': FastF1’s own backend (default, 2018-present)
  • 'f1timing': F1 live timing API (2018-present)
  • 'ergast': Ergast database (1950-present, limited features)
bool
default:"False"
If True, requires exact event name match instead of fuzzy search

Usage Examples

get_session() returns a Session object but does not load any data yet. You must call session.load() to fetch timing, telemetry, and other session-specific data.

Getting an Event

You can also access the event object directly using get_event().

Function: get_event()

Returns an Event object representing a complete race weekend.
int
required
Championship year
int | str
required
Event name (string) or round number (integer)

Event Class

The Event class represents a single race weekend and provides methods to access individual sessions.

Event Methods

Returns a Session object for the specified session.
Returns the race session.
Returns the qualifying session.
Returns the sprint session (if applicable).
Returns the specified practice session.
Returns True if this is a testing event.

Event Schedules

Getting the Event Schedule

Returns an EventSchedule object containing all events for a season.

EventSchedule Class

The EventSchedule class extends pandas DataFrame and provides additional methods:
Get an event by its round number.
Get an event by name using fuzzy matching.
Returns a boolean Series indicating which events are testing events.

Available Event Data

Each event in the schedule contains:
  • RoundNumber - Round number in the championship
  • Country - Country where the event takes place
  • Location - Specific location/circuit
  • EventName - Short name of the event
  • OfficialEventName - Official full name
  • EventDate - Date of the event (usually race day)
  • EventFormat - Format type: 'conventional', 'sprint', 'sprint_shootout', 'sprint_qualifying', or 'testing'
  • Session1 through Session5 - Names of each session
  • Session1Date through Session5Date - Local timestamps for each session
  • Session1DateUtc through Session5DateUtc - UTC timestamps for each session
  • F1ApiSupport - Whether F1 API data is available

Testing Sessions

Pre-season testing sessions require special functions:

Session Object

Once you have a Session object, you can access its properties:
Most session data is only available after calling session.load(). See the Loading Data page for details.