Skip to main content

What is tif1?

tif1 is a fast, canonical Formula 1 data library that provides access to comprehensive F1 timing data from 2018 to the present. It fetches data from TracingInsights’ canonical dataset and offers a familiar API surface compatible with fastf1.

Key Insight

tif1 is built from the ground up for speed. While data becomes available approximately 30 minutes after a session ends (slightly longer than fastf1’s 20-25 minutes), this delay reflects the additional data enrichment and processing that makes tif1’s dataset more comprehensive.

Why tif1?

tif1 was created to address specific pain points in F1 data analysis:

⚡ Performance First

Direct CDN access with SQLite caching. Fetch specific lap telemetry in seconds without loading entire sessions.

🎯 Lazy Loading

No session.load() needed. Data is fetched on-demand, only when you access it.

🚀 Parallel Fetching

Async HTTP requests fetch multiple telemetry streams simultaneously, achieving 4-5x speedup.

💪 Reliable

Built-in retry logic with circuit breaker pattern and automatic CDN fallback.

Key Features

Speed & Performance

  • Direct CDN Access: Data served via jsDelivr CDN with minimal latency
  • SQLite Cache: Intelligent caching with JSON storage for instant repeated access
  • Async Parallelism: Fetch telemetry for 19 drivers in ~0.4s (vs ~1.3s sequential)
  • Lazy Evaluation: Only fetch what you need, when you need it

Data Completeness

Access comprehensive Formula 1 data including:
  • Lap times with sector splits (S1, S2, S3)
  • Tire compounds and stint information
  • Telemetry: Speed, Throttle, Brake, RPM, Gear, DRS
  • Position data (X, Y, Z coordinates)
  • Acceleration data (X, Y, Z axes)
  • Distance and relative distance
  • Weather conditions
  • Race control messages

Developer Experience

1

Type Safety

Comprehensive type hints throughout for excellent IDE autocomplete and type checking
2

Error Handling

Rich exception hierarchy (DataNotFoundError, DriverNotFoundError, NetworkError, etc.)
3

Jupyter Ready

Built-in rich HTML display for notebooks with formatted DataFrames
4

Configurable

.tif1rc configuration file support for project-specific settings

tif1 vs fastf1

tif1 is designed as a performance-focused alternative to fastf1 with a compatible API surface.

When to Use tif1

Choose tif1 when you need:
  • Fast access to specific lap telemetry without loading entire sessions
  • Parallel data fetching for analysis across multiple drivers
  • Minimal memory footprint with lazy loading
  • Modern async/await patterns in your data pipelines
  • Optional Polars backend for 2x faster DataFrame operations

When to Use fastf1

Choose fastf1 when you need:
  • Live timing data during sessions
  • Ergast API integration for historical statistics
  • Data available 5-10 minutes earlier after session ends
  • Proven stability with years of production use

API Compatibility

tif1 implements fastf1’s core API:
import tif1

# Same familiar API
session = tif1.get_session(2025, "Monaco Grand Prix", "Qualifying")
laps = session.laps
driver = session.get_driver("VER")
fastest = driver.get_fastest_lap()
telemetry = fastest.telemetry
Most fastf1 code works with tif1 by simply changing the import statement. See the fastf1 Compliance Matrix for detailed compatibility.

What’s Different?

Out of Scope:
  • fastf1.ergast - Historical statistics API
  • fastf1.livetiming - Live session data streaming
Data Source:
  • tif1 uses TracingInsights canonical data (GitHub via jsDelivr CDN)
  • fastf1 uses official FIA API and timing data

Performance Examples

Here’s what tif1’s performance optimizations enable:
# Traditional sequential fetching
for driver_code in ["VER", "HAM", "LEC"]:
    driver = session.get_driver(driver_code)
    fastest = driver.get_fastest_lap()
    tel = fastest.telemetry  # ~0.4s each = 1.2s total

Data Availability

Data becomes available approximately 30 minutes after a session ends. This is 5-10 minutes longer than fastf1 due to additional enrichment processing.
Supported Years: 2018 - Present Session Types:
  • Practice 1, Practice 2, Practice 3
  • Qualifying
  • Sprint, Sprint Qualifying, Sprint Shootout
  • Race

Architecture Highlights

tif1 is optimized for speed at every layer:
  • HTTP Layer: niquests with connection pooling and keep-alive
  • Async Engine: nest-asyncio for concurrent fetching in any context
  • JSON Parsing: orjson for fast C-based parsing
  • Caching: SQLite with in-memory buffer for sub-millisecond lookups
  • Circuit Breaker: Automatic failure detection with exponential backoff
  • CDN Strategy: Primary jsDelivr with automatic fallback

Next Steps

Installation

Install tif1 and optional dependencies

Quick Start

Get started with your first tif1 script