Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TracingInsights/tif1/llms.txt
Use this file to discover all available pages before exploring further.
Function Signature
Description
Get a session object for accessing lap timing, telemetry, weather, and race control message data from an F1 session. This is the primary entry point for accessing tif1 data. The function returns aSession object that provides access to all session data including laps, telemetry, weather information, and race control messages.
Parameters
Season year (2018-current). Must be within the supported data range.
Grand Prix identifier. Can be either:
- Event name (e.g.,
"Abu Dhabi Grand Prix","British Grand Prix") - Round number (e.g.,
1for the first race of the season) - Partial/abbreviated name with fuzzy matching (e.g.,
"Silverstone","Monaco")
Session identifier. Can be either:
- Full session name:
"Practice 1","Practice 2","Practice 3","Qualifying","Sprint","Sprint Shootout","Sprint Qualifying","Race" - Abbreviation:
"FP1","FP2","FP3","Q","S","SS","SQ","R" - Session number (1-5) corresponding to the session order for that event
Enable persistent caching of fetched data. If
None, uses the configured default from config. When enabled, data is cached to disk to speed up subsequent access.DataFrame library choice. If
None, uses the configured default (pandas). Options:"pandas": Use pandas DataFrames (default)"polars": Use polars DataFrames for better performance (requires polars installation)
Returns
A Session object with the following key attributes and methods:Attributes:
year(int): Season yeargp(str): Grand Prix name (URL encoded)session(str): Session name (URL encoded)laps(Laps): DataFrame with all lap timing datadrivers(list[str]): List of driver numbers as stringsweather(DataFrame): Weather data throughout the sessionrace_control_messages(DataFrame): Race control messagesresults(SessionResults): Final session resultscircuit_info(CircuitInfo): Circuit layout information
load(laps=True, telemetry=True, weather=True, messages=True): Load specific data typesget_driver(identifier): Get driver information by number or code
Raises
ValueError: If year is out of the supported range (before 2018)ValueError: If the session doesn’t exist for the specified eventDataNotFoundError: If data cannot be found for the requested sessionNetworkError: If network request fails
Examples
Basic Usage
Using Round Number
Using Session Abbreviations
Using Polars Backend
Selective Data Loading
Disable Caching
See Also
- get_events - Get all events for a season
- get_sessions - Get available sessions for an event
- Session.load() - Load session data selectively