Event#
- class fastf1.events.Event(*args, year=None, **kwargs)[source]#
This class represents a single event (race weekend or testing event).
Each event consists of one or multiple sessions, depending on the type of event and depending on the event format.
For detailed information about the information that is available for each event, see Event Schedule Data.
This class is usually not instantiated directly. You should use
fastf1.get_event()or similar to get a specific event.- Parameters:
year (
int) – Championship year
Methods:
Return True or False, depending on whether this event is a testing event.
get_session_name(identifier)Return the full session name of a specific session from this event.
get_session_date(identifier[, utc])Return the date and time (if available) at which a specific session of this event is or was held.
get_session(identifier)Return a session from this event.
get_race()Return the race session.
Return the qualifying session.
Return the sprint session.
Return the sprint shootout session.
Return the sprint qualifying session.
get_practice(number)Return the specified practice session.
- is_testing()[source]#
Return True or False, depending on whether this event is a testing event.
- Return type:
bool
- get_session_name(identifier)[source]#
Return the full session name of a specific session from this event.
Examples
>>> import fastf1 >>> event = fastf1.get_event(2021, 1) >>> event.get_session_name(3) 'Practice 3' >>> event.get_session_name('Q') 'Qualifying' >>> event.get_session_name('praCtice 1') 'Practice 1'
- Parameters:
identifier – session name, abbreviation or number, see Session identifiers
- Raises:
ValueError – No matching session or invalid identifier
- Return type:
str
- get_session_date(identifier, utc=False)[source]#
Return the date and time (if available) at which a specific session of this event is or was held.
- Parameters:
identifier (
Union[str,int]) – session name, abbreviation or number, see Session identifiersutc – return a non-timezone-aware UTC timestamp
- Raises:
ValueError – No matching session or invalid identifier
- Return type:
Timestamp
- get_session(identifier)[source]#
Return a session from this event.
- Parameters:
identifier (
Union[int,str]) – session name, abbreviation or number, see Session identifiers- Raises:
ValueError – No matching session or invalid identifier
- Return type: