LiveF1 API - livef1
¶
Functions
|
Retrieve data for a specified Formula 1 season. |
|
Retrieve data for a specific meeting in a given season. |
|
Retrieve data for a specific session within a meeting and season. |
- livef1.api.get_meeting(season: int, meeting_identifier: str = None, meeting_key: int = None) Meeting [source]¶
Retrieve data for a specific meeting in a given season.
- Parameters:
- season
int
The year of the season to retrieve the meeting from.
- meeting_identifier
str
The identifier (e.g., circuit name, grand prix name) of the meeting. The identifier is going to be searched in the season’s meeting table columns:
“Meeting Official Name”
“Meeting Name”
“Circuit Short Name”
Therefore, it is suggested to use keywords that is distinguishable among meetings. Another suggestion is using circuit names for querying.
- meeting_key
int
The key of the meeting to get the desired meeting whose key is matching.
- season
- Returns:
- Meeting
A Meeting object containing sessions and metadata for the specified meeting.
- Raises:
- livef1Exception
If the meeting cannot be found based on the provided parameters.
- livef1.api.get_season(season: int) Season [source]¶
Retrieve data for a specified Formula 1 season.
- Parameters:
- season
int
The year of the season to retrieve.
- season
- Returns:
- Season
A Season object containing all meetings and sessions for the specified year.
- Raises:
- livef1Exception
If no data is available for the specified season.
- livef1.api.get_session(season: int, meeting_identifier: str = None, session_identifier: str = None, meeting_key: int = None, session_key: int = None) Session [source]¶
Retrieve data for a specific session within a meeting and season.
- Parameters:
- season
int
The year of the season.
- meeting_identifier
str
The identifier (e.g., circuit name, grand prix name) of the meeting. The identifier is going to be searched in the season’s meeting table columns:
“Meeting Official Name”
“Meeting Name”
“Circuit Short Name”
Therefore, it is suggested to use keywords that is distinguishable among meetings. Another suggestion is using circuit names for querying.
- meeting_key
int
The key of the meeting to get the desired meeting whose key is matching.
- session_identifier
str
The identifier of the session (e.g., “Practice 1”, “Qualifying”). The identifier is going to be searched in the meeting’s sessions table.
- session_key
int
The key of the session to get the desired session whose key is matching.
- season
- Returns:
- Session
A Session object containing data about the specified session.
- Raises:
- livef1Exception
If the session cannot be found based on the provided parameters.