Skip to main content
The events module is your gateway to discovering and navigating Formula 1 calendar data. It provides a rich, type-safe API for querying event schedules, session timings, and comprehensive metadata across multiple seasons, serving as the foundation for all data discovery operations in tif1.

Overview

The events module provides a comprehensive, production-ready set of functions and classes for discovering what Formula 1 data is available in the TracingInsights CDN for specific years and events. This module serves as the primary entry point for event discovery and session navigation in tif1, enabling sophisticated workflows for data analysis, visualization, and automation.

Core Capabilities

The events API empowers you to:
  • Query season schedules: Retrieve complete event calendars for any supported F1 season (2018-present) with full metadata including event names, locations, countries, dates, and formats
  • Discover available sessions: Programmatically determine which sessions (Practice 1-3, Qualifying, Sprint Qualifying, Sprint, Race) have data available for each event
  • Access rich event metadata: Get detailed information about each Grand Prix including official event names (with sponsors), circuit locations, round numbers, event dates, and weekend formats
  • Navigate flexibly: Use intelligent fuzzy matching to find events by partial names, abbreviations, circuit names, or round numbers without requiring exact string matches
  • Work with timezone-aware data: Access session start times in both local circuit timezone and UTC, enabling accurate time-based analysis and scheduling
  • Handle different event formats: Seamlessly work with conventional race weekends (3 practice sessions), sprint weekends (varied formats by year), and pre-season testing events
  • Leverage pandas integration: Work with familiar DataFrame and Series interfaces enhanced with domain-specific methods for F1 data navigation
  • Benefit from intelligent caching: All schedule data is cached in-memory after first fetch, making subsequent queries instant with zero network overhead

Architecture & Design Philosophy

The events module is built on several key design principles:
  1. Performance-First: Aggressive caching strategies ensure that schedule queries complete in <10ms after initial load. The module uses vendored JSON files for recent seasons and CDN fallback for historical data.
  2. Pandas Integration: All data structures extend pandas DataFrame and Series, providing familiar interfaces while adding F1-specific methods. This enables seamless integration with the broader pandas ecosystem.
  3. Flexible Querying: Multiple lookup methods (by round number, by name, by fuzzy match) ensure you can query data in the most natural way for your use case, whether programmatic or interactive.
  4. Type Safety: Full type hints throughout the API enable excellent IDE autocomplete and static type checking with mypy or pyright.
  5. Graceful Degradation: The module handles missing data, network failures, and edge cases gracefully, providing clear error messages and fallback behaviors.

Data Sources & Availability

Schedule data is sourced from two primary locations:
  • Vendored JSON files: Recent seasons (typically current and previous year) are packaged with tif1 for instant access without network requests
  • TracingInsights CDN: Historical seasons are fetched from the TracingInsights GitHub data repositories via the jsdelivr CDN
Supported years: 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026 The schedule data includes:
  • All championship Grand Prix events
  • Pre-season testing events (optional, can be filtered)
  • Sprint weekend events with correct session formats
  • Session names and availability
  • Event metadata (names, locations, countries, dates, formats)
  • Session timing information (local and UTC)
All event discovery functions use intelligent caching to minimize network requests. Schedule data is fetched once per Python session and reused across multiple queries, making repeated lookups essentially free.
The events module tells you what data should be available based on the official F1 calendar. However, actual data availability in the CDN may vary. Always handle DataNotFoundError exceptions when loading session data, as some sessions may have incomplete or missing data.

Core Functions

get_events

Retrieves the complete EventSchedule DataFrame containing all Grand Prix events for the specified Formula 1 season. This is the primary entry point for discovering what events occurred (or are scheduled) in a given year. The function returns an EventSchedule object, which is a specialized pandas DataFrame subclass that includes additional methods for event lookup and filtering. Each row in the DataFrame represents a single Grand Prix event with comprehensive metadata including event names, locations, dates, session schedules, and format information. Parameters:
int
required
The Formula 1 season year to query. Must be between 2018 and the current year (2026). Years outside this range will raise a DataNotFoundError as schedule data is not available.Supported years: 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026
Returns:
EventSchedule
A pandas DataFrame subclass containing all events for the specified year. The DataFrame includes the following columns:
  • EventName: Official short name (e.g., “Belgian Grand Prix”)
  • Location: Circuit or venue name (e.g., “Spa-Francorchamps”)
  • OfficialEventName: Full official event title with sponsors
  • RoundNumber: Championship round number (1-indexed)
  • Country: Country where the event takes place
  • EventDate: Main event date (typically race day)
  • EventFormat: Format type (“conventional”, “sprint”, or “testing”)
  • Session1, Session2, …: Names of available sessions
  • Session1Date, Session2Date, …: Local session start times with timezone
  • Session1DateUtc, Session2DateUtc, …: UTC session start times
The EventSchedule object also provides specialized methods like get_event_by_round() and get_event_by_name() for convenient event lookup.
Raises:
  • DataNotFoundError: If schedule data is not available for the specified year
  • NetworkError: If the CDN request fails and no cached data is available
  • InvalidDataError: If the schedule data is malformed or cannot be parsed
Behavior & Implementation Details:
  • Caching: Schedule data is cached in-memory after the first request. Subsequent calls for the same year return cached data instantly without network requests.
  • Data Source: Schedule data is fetched from the TracingInsights CDN (via jsdelivr) or loaded from vendored JSON files included with the package for recent seasons.
  • Testing Events: By default, get_events() includes all events including pre-season testing. Use get_event_schedule(year, include_testing=False) if you want to exclude testing events.
  • Performance: This function is highly optimized and typically completes in <10ms for cached data or <200ms for initial CDN fetch.
Example Usage:
Advanced Example - Analyzing Event Distribution:
Use get_events() when you need to work with the complete season schedule as a DataFrame. If you only need a single event, use get_event() or get_event_by_round() for better performance.

get_sessions

Returns a list of all available session names for a specific Grand Prix event. This function is essential for discovering which sessions (Practice, Qualifying, Sprint, Race, etc.) have data available in the CDN for a particular event. Session availability varies by event format:
  • Conventional weekends: Typically include Practice 1, Practice 2, Practice 3, Qualifying, and Race
  • Sprint weekends: May include Practice 1, Sprint Qualifying, Sprint, Qualifying, and Race (format varies by year)
  • Testing events: Usually include multiple test sessions
Parameters:
int
required
The Formula 1 season year. Must be a valid year with available schedule data (2018-2026).
str
required
The Grand Prix event name. This should match the official event name (e.g., “Belgian Grand Prix”), but fuzzy matching is applied internally so partial names like “Belgian” will also work.Accepted formats:
  • Full official name: “Belgian Grand Prix”
  • Partial name: “Belgian”
  • Case-insensitive: “belgian grand prix”, “BELGIAN GP”
Returns:
list[str]
An ordered list of session names available for the specified event. Sessions are returned in chronological order (Practice 1 → Practice 2 → … → Race).Common session names:
  • "Practice 1", "Practice 2", "Practice 3"
  • "Qualifying"
  • "Sprint Qualifying", "Sprint Shootout" (sprint weekend qualifying)
  • "Sprint" (sprint race)
  • "Race" (main Grand Prix)
  • "Pre-Season Testing" (testing events)
Raises:
  • DataNotFoundError: If the event is not found in the specified year’s schedule
  • NetworkError: If schedule data cannot be fetched and no cache is available
  • InvalidDataError: If the schedule data is malformed
Behavior & Implementation Details:
  • Fuzzy Matching: The function uses intelligent fuzzy matching to find events even with partial or misspelled names. For example, “Silverstone”, “British”, and “British Grand Prix” will all match the British Grand Prix.
  • Caching: Session lists are cached after the first query, making subsequent calls instant.
  • Data Availability: The returned list indicates which sessions have data available in the CDN. Just because a session is listed doesn’t guarantee all data types (laps, telemetry, etc.) are available for that session.
  • Empty Lists: If an event has no sessions (rare edge case), an empty list is returned rather than raising an exception.
Example Usage:
Advanced Example - Session Availability Analysis:
Practical Example - Loading All Sessions for an Event:
The presence of a session in the returned list does not guarantee that all data types are available. Some sessions may have lap data but no telemetry, or vice versa. Always handle potential DataNotFoundError exceptions when loading session data.

get_event

Retrieves an Event object for a specific Grand Prix by either name or round number. This is the most flexible event lookup function, accepting multiple identifier formats and providing intelligent fuzzy matching for event names. The returned Event object is a pandas Series subclass that contains all event metadata and provides methods for accessing sessions, session timings, and other event-specific information. Parameters:
int
required
The Formula 1 season year (2018-2026).
int | str
required
The Grand Prix identifier. Can be either:Round number (int):
  • Championship round number (1-indexed)
  • Example: 12 for the 12th race of the season
  • Must be within the valid range for the season (typically 1-23)
Event name (str):
  • Full official name: "Belgian Grand Prix"
  • Partial name: "Belgian", "Spa"
  • Case-insensitive: "belgian grand prix", "BELGIAN GP"
  • Abbreviations: "BEL" (may work depending on fuzzy matching)
bool
default:"False"
Controls the string matching behavior when gp is a string:
  • False (default): Uses fuzzy matching algorithm to find the best match. Tolerates typos, partial names, and case variations.
  • True: Requires an exact string match (case-sensitive). Use this when you need precise control or want to avoid ambiguous matches.
Note: This parameter is ignored when gp is an integer (round number).
Returns:
Event | None
An Event object (pandas Series subclass) containing event metadata and methods for session access. Returns None if the event is not found and exact_match=False.When exact_match=True, raises DataNotFoundError instead of returning None.
Raises:
  • DataNotFoundError: If the event is not found and exact_match=True, or if the round number is invalid
  • ValueError: If the round number is out of range for the season
  • NetworkError: If schedule data cannot be fetched
  • InvalidDataError: If the schedule data is malformed
Behavior & Implementation Details:
  • Fuzzy Matching Algorithm: Uses Levenshtein distance and token-based matching to find the closest event name. Handles common abbreviations, typos, and variations.
  • Round Number Lookup: When gp is an integer, performs direct index lookup in the schedule (O(1) operation).
  • Caching: Event objects are cached after creation, making repeated lookups instant.
  • None vs Exception: With exact_match=False, returns None for not found. With exact_match=True, raises DataNotFoundError. Choose based on your error handling preference.
Example Usage:
Advanced Example - Event Comparison:
Practical Example - Flexible Event Lookup:
For programmatic access where you know the exact round number, use the integer form for best performance and reliability. For user-facing applications or interactive use, the fuzzy string matching provides excellent user experience.

get_event_by_round

Retrieves an Event object by its championship round number. This is the most reliable and performant way to look up events when you know the round number, as it performs a direct index lookup without any string matching or fuzzy logic. Round numbers are 1-indexed and correspond to the official FIA Formula 1 World Championship round numbering. For example, the first race of the season is round 1, the second is round 2, and so on. Round numbers are consistent within a season but may vary between seasons for the same Grand Prix (e.g., Monaco might be round 5 in one year and round 7 in another). Parameters:
int
required
The Formula 1 season year (2018-2026). Must be a year with available schedule data.
int
required
The championship round number (1-indexed). Must be within the valid range for the specified season.Valid ranges by season:
  • Most seasons: 1-22 or 1-23 rounds
  • 2020 (COVID-affected): 1-17 rounds
  • Check len(tif1.get_events(year)) for exact count
Note: Round numbers include all championship events but typically exclude pre-season testing.
Returns:
Event
An Event object (pandas Series subclass) containing all event metadata and methods for session access. The Event object provides dictionary-style access to fields like EventName, Location, Country, RoundNumber, EventDate, EventFormat, and session information.
Raises:
  • ValueError: If the round number is out of range for the specified season (e.g., requesting round 25 when the season only has 22 rounds)
  • DataNotFoundError: If schedule data is not available for the specified year
  • NetworkError: If schedule data cannot be fetched from the CDN and no cached data is available
Behavior & Implementation Details:
  • Performance: This is the fastest event lookup method, performing a direct index lookup in O(1) time. Use this when you know the round number.
  • Reliability: Round numbers are unambiguous and don’t require any fuzzy matching or string comparison, making this the most reliable lookup method.
  • Caching: Event objects are cached after creation, so repeated calls with the same parameters return instantly.
  • Testing Events: Pre-season testing events typically don’t have round numbers and cannot be accessed via this function. Use get_event_by_name() for testing events.
Example Usage:
Advanced Example - Analyzing Round Progression:
Practical Example - Loading Specific Round Data:
When building applications that iterate through a season chronologically, using get_event_by_round() with a simple range loop is more efficient and clearer than iterating through the EventSchedule DataFrame.

get_event_by_name

Retrieves an Event object by its name with optional fuzzy matching. This function provides flexible event lookup using event names, partial names, circuit names, or common abbreviations. It’s ideal for interactive use, user-facing applications, or when you don’t know the exact event name format. The fuzzy matching algorithm uses Levenshtein distance and token-based matching to find the closest event name, handling typos, case variations, and partial matches intelligently. For example, “Silverstone”, “British”, “british grand prix”, and “BRITISH GP” will all successfully match the British Grand Prix. Parameters:
int
required
The Formula 1 season year (2018-2026). Must be a year with available schedule data.
str
required
The event name or partial name to search for. The function accepts multiple formats:Full official names:
  • "Belgian Grand Prix"
  • "British Grand Prix"
  • "Monaco Grand Prix"
Partial names:
  • "Belgian" → matches “Belgian Grand Prix”
  • "British" → matches “British Grand Prix”
  • "Monaco" → matches “Monaco Grand Prix”
Circuit names:
  • "Spa" → matches “Belgian Grand Prix” (Spa-Francorchamps)
  • "Silverstone" → matches “British Grand Prix”
  • "Monza" → matches “Italian Grand Prix”
Case-insensitive:
  • "belgian grand prix", "BELGIAN GP", "Belgian" all work
Testing events:
  • "Pre-Season Testing" or "Testing" for test sessions
bool
default:"False"
Controls the string matching behavior:
  • False (default): Uses fuzzy matching algorithm to find the best match. Tolerates typos, partial names, case variations, and common abbreviations.
  • True: Requires an exact string match (case-sensitive). The provided name must match the official event name character-for-character.
When to use exact_match=True:
  • Validating user input against known event names
  • Ensuring no false positives in automated systems
  • When you have the exact official event name
When to use exact_match=False (default):
  • Interactive applications where users type event names
  • When accepting partial or abbreviated input
  • When you want maximum flexibility
Returns:
Event
An Event object (pandas Series subclass) containing all event metadata and methods for session access.
Raises:
  • DataNotFoundError: If the event is not found in the specified year’s schedule
  • NetworkError: If schedule data cannot be fetched from the CDN and no cached data is available
  • InvalidDataError: If the schedule data is malformed or cannot be parsed
Behavior & Implementation Details:
  • Fuzzy Matching Algorithm: Uses a combination of Levenshtein distance (edit distance) and token-based matching to find the closest event name. The algorithm tokenizes both the search query and event names, compares tokens, and calculates similarity scores.
  • Match Scoring: The fuzzy matcher assigns a similarity score to each event name. The event with the highest score above a threshold is returned. If no event scores above the threshold, DataNotFoundError is raised.
  • Performance: Fuzzy matching is more expensive than round number lookup but still completes in <5ms for cached schedules. The algorithm iterates through all events in the season (typically 20-23 events).
  • Caching: Event objects are cached after creation. The fuzzy matching itself is not cached, so each call performs the matching algorithm, but the resulting Event object is reused.
Example Usage:
Advanced Example - User Input Handling:
For user-facing applications, fuzzy matching provides excellent UX by accepting partial names and typos. For programmatic access with known event names, use get_event_by_round() for better performance.

get_event_schedule

Retrieves the complete event schedule for a Formula 1 season as an EventSchedule DataFrame. This function provides the most comprehensive view of a season’s calendar, including all Grand Prix events, their sessions, timing information, and metadata. It’s the foundation for season-wide analysis and iteration. The returned EventSchedule object is a specialized pandas DataFrame subclass that includes all the standard DataFrame functionality plus additional F1-specific methods for event lookup and filtering. Each row represents a single Grand Prix event with comprehensive metadata. Parameters:
int
required
The Formula 1 season year (2018-2026). Must be a year with available schedule data.
bool
default:"True"
Controls whether pre-season testing events are included in the returned schedule.
  • True (default): Includes all events including pre-season testing sessions
  • False: Excludes testing events, returning only championship Grand Prix events
Use cases for include_testing=False:
  • Championship analysis (only counting points-scoring events)
  • Season statistics (excluding non-competitive sessions)
  • Calendar visualization (showing only race weekends)
Use cases for include_testing=True:
  • Complete data availability overview
  • Pre-season analysis and testing data
  • Comprehensive event iteration
Returns:
EventSchedule
An EventSchedule object (pandas DataFrame subclass) containing all events for the specified year. The DataFrame includes the following columns:Core Event Information:
  • EventName: Official short name (e.g., “Belgian Grand Prix”)
  • Location: Circuit or venue name (e.g., “Spa-Francorchamps”)
  • OfficialEventName: Full official event title with sponsors (e.g., “FORMULA 1 ROLEX BELGIAN GRAND PRIX 2021”)
  • RoundNumber: Championship round number (1-indexed integer)
  • Country: Country where the event takes place (e.g., “Belgium”)
  • EventDate: Main event date as pandas Timestamp (typically race day)
  • EventFormat: Format type - one of “conventional”, “sprint”, or “testing”
Session Information:
  • Session1, Session2, Session3, Session4, Session5: Names of available sessions (e.g., “Practice 1”, “Qualifying”, “Race”)
  • Session1Date, Session2Date, …: Local session start times with timezone information
  • Session1DateUtc, Session2DateUtc, …: UTC session start times as pandas Timestamps
The EventSchedule object also provides specialized methods:
  • get_event_by_round(round_number): Get a specific event by round number
  • get_event_by_name(name, strict_search=False): Get a specific event by name with optional fuzzy matching
  • get_event(identifier, strict_search=False): Get an event by either round number or name
All standard pandas DataFrame operations are available (filtering, sorting, grouping, etc.).
Raises:
  • DataNotFoundError: If schedule data is not available for the specified year
  • NetworkError: If the CDN request fails and no cached data is available
  • InvalidDataError: If the schedule data is malformed or cannot be parsed
Behavior & Implementation Details:
  • Data Source: Schedule data is fetched from vendored JSON files (for recent seasons) or the TracingInsights CDN (for historical seasons). The data source is transparent to the user.
  • Caching: Schedule data is cached in-memory after the first request. Subsequent calls for the same year and include_testing value return cached data instantly.
  • Testing Events: Testing events typically have EventFormat="testing" and may not have a RoundNumber. They usually appear at the beginning of the season (pre-season testing).
  • Session Columns: The number of session columns varies by event format. Conventional weekends typically have 5 sessions (FP1, FP2, FP3, Q, R), while sprint weekends may have different configurations. Unused session columns contain NaN or empty strings.
  • Timezone Handling: Session dates include timezone information. Local times use the circuit’s timezone (e.g., “Europe/Brussels” for Spa), while UTC times are timezone-aware UTC timestamps.
  • Performance: Initial load takes <200ms for CDN fetch or <10ms for vendored data. Cached access is <1ms.
Example Usage:
Advanced Example - Season Analysis:
Practical Example - Export to CSV:
Practical Example - Calendar Visualization:
Use get_event_schedule() when you need to work with the complete season as a DataFrame for analysis, filtering, or iteration. For single event lookup, use get_event() or get_event_by_round() for better performance.
The get_events(year) function is an alias for get_event_schedule(year, include_testing=True). Both return the same EventSchedule object. Use whichever name is more intuitive for your use case.

Event

The Event class is a pandas Series subclass representing a single Grand Prix event with metadata and session access.

Properties

int
The season year (read-only property).

Series Data Fields

Access event data using dictionary-style indexing:
str
The official event name (e.g., “Belgian Grand Prix”).
str
The event location (e.g., “Spa-Francorchamps”).
str
The full official event name (e.g., “FORMULA 1 ROLEX BELGIAN GRAND PRIX 2021”).
int
The championship round number.
str
The country where the event takes place.
pd.Timestamp
The main event date.
str
The event format (e.g., “conventional”, “sprint”).
str
Session names (e.g., “Practice 1”, “Qualifying”, “Race”).
datetime
Local session date/time with timezone.
pd.Timestamp
UTC session timestamps.
Example:

Methods

get_session(session_name)

Get a Session object for a specific session within this event. Parameters:
  • session_name: Session identifier - can be:
    • Session name (e.g., “Qualifying”, “Race”)
    • Session abbreviation (e.g., “Q”, “R”, “FP1”)
    • Session number (e.g., 1, 2, 3)
Returns:
  • Session object ready to load data
Raises:
  • ValueError: If the session identifier is invalid or doesn’t exist for this event
Example:

get_session_name(identifier)

Return the canonical session name for a session identifier. Parameters:
  • identifier: Session number, abbreviation, or partial name
Returns:
  • Canonical session name
Raises:
  • ValueError: If the identifier is invalid
Example:

get_session_date(identifier, utc=False)

Return the date and time of a specific session. Parameters:
  • identifier: Session name, abbreviation, or number
  • utc: If True, return UTC timestamp. If False, return local time with timezone
Returns:
  • Timestamp for the session
Raises:
  • ValueError: If session doesn’t exist or local timestamp unavailable
Example:

get_race()

Return the race session (convenience method).

get_qualifying()

Return the qualifying session (convenience method).

get_sprint()

Return the sprint session (convenience method).

get_sprint_shootout()

Return the sprint shootout session (convenience method).

get_sprint_qualifying()

Return the sprint qualifying session (convenience method).

get_practice(number)

Return the specified practice session. Parameters:
  • number: Practice session number (1, 2, or 3)
Example:

EventSchedule

The EventSchedule class is a pandas DataFrame subclass containing all events for a season.

Properties

int | None
The season year.

Methods

get_event_by_round(round_number)

Return an Event for a specific championship round. Parameters:
  • round_number: The round number (1-indexed)
Returns:
  • Event object
Raises:
  • ValueError: If the round number is invalid

get_event_by_name(name, strict_search=False)

Return an Event by name with optional fuzzy matching. Parameters:
  • name: Event name
  • strict_search: If True, requires exact match
Returns:
  • Event object or None if not found

get_event(identifier, strict_search=False)

Return an Event by round number or name. Parameters:
  • identifier: Round number (int) or event name (str)
  • strict_search: If True, requires exact name match
Returns:
  • Event object or None if not found
Example:

Session name formats

While tif1 is flexible with session names, use these standard formats for consistency:
tif1 uses fuzzy matching internally, so “P1”, “FP1”, and “Practice 1” all resolve to the same session. However, using standard names improves code clarity.

Complete Examples

List all events and sessions

Work with event objects

Fuzzy event matching

Iterate through season

Multi-year comparison

Find events by criteria

Load all sessions for an event

Build a season calendar

Analyze sprint weekend evolution

Export season data to multiple formats

Build an event lookup CLI tool

Track calendar changes across years


Best Practices

Performance Optimization

1. Use round numbers when possible Round number lookups are O(1) operations and don’t require fuzzy matching:
2. Cache schedule data for repeated queries If you’re making multiple queries for the same year, fetch the schedule once:
3. Use include_testing=False when appropriate If you don’t need testing events, exclude them to reduce data size:
4. Leverage pandas operations for filtering Use pandas DataFrame operations for efficient filtering:

Error Handling

1. Always handle DataNotFoundError Event and session data may not always be available:
2. Validate round numbers Check round number validity before lookup:
3. Handle fuzzy matching ambiguity When using fuzzy matching, verify the result:

Code Organization

1. Create helper functions for common patterns
2. Use type hints for clarity
3. Document expected data availability

Data Validation

1. Verify session availability before loading
2. Validate event format expectations
3. Check data completeness

Testing and Development

1. Use known events for testing
2. Mock network calls in tests
3. Test fuzzy matching edge cases

Common Patterns

Pattern: Season-wide analysis

Pattern: Event discovery workflow

Pattern: Batch processing


Troubleshooting

Issue: Event not found with fuzzy matching

Problem: get_event_by_name() raises DataNotFoundError even though the event exists. Solution: The event name might be too generic or ambiguous. Try:

Issue: Session not available

Problem: get_session() raises ValueError for a session that should exist. Solution: Check actual session availability:

Issue: Network errors

Problem: NetworkError when fetching schedule data. Solution: The CDN might be unavailable. Recent years use vendored data:

Issue: Incorrect round numbers

Problem: Round numbers don’t match expectations. Solution: Round numbers can change between years:

Issue: Missing session timing data

Problem: get_session_date() raises ValueError. Solution: Not all events have complete timing data:

Core API

Load and work with session data (Session, Laps, Telemetry)

Schedule Validation

Schedule data validation and schema

HTTP & Networking

CDN fetching, caching, and network configuration

Data Flow

Understand how event data flows through tif1

Caching Strategy

Learn about tif1’s caching mechanisms

CLI Usage

Use tif1’s command-line interface for event discovery

API Reference Summary

Functions

Classes

Key Properties

Event properties:
  • year: Season year (int)
  • EventName: Official event name (str)
  • Location: Circuit name (str)
  • Country: Country (str)
  • RoundNumber: Championship round (int)
  • EventDate: Event date (Timestamp)
  • EventFormat: “conventional”, “sprint”, or “testing” (str)
EventSchedule properties:
  • year: Season year (int | None)
  • All pandas DataFrame properties and methods

Version History

Changes in tif1 2.0

  • Added EventSchedule class with enhanced lookup methods
  • Improved fuzzy matching algorithm for event names
  • Added include_testing parameter to get_event_schedule()
  • Enhanced session timing data with timezone support
  • Added vendored schedule data for recent seasons
  • Improved error messages and exception handling

Deprecated Features

None. The events API is stable and fully supported.
Need help? If you encounter issues with the events API, check the Troubleshooting section above or open an issue on GitHub with details about your use case.
Last modified on May 8, 2026