Skip to main content
The tif1.session module is the canonical import surface for the session API. It is a thin re-export shim: it imports Session and get_session from tif1.core and exports them again. The module contains no code of its own.

Overview

src/tif1/session.py
Import Session and get_session from tif1.session or from tif1 directly. Both import paths resolve to the same objects defined in tif1.core:
The shim exists to keep tif1.session a stable import path while the implementation lives in tif1.core.

Usage

Construct a Session with a year, a Grand Prix, and a session name:
Or use the factory function, which also validates that the session exists in the event schedule:
The session.load() call requires network access on a cold cache. telemetry=True also fetches the telemetry of every lap, which is slow. With telemetry=False, each lap fetches its telemetry on first access.

Full Reference

Session and get_session are documented on the Core API page. That page covers the constructor parameters (year, gp, session, enable_cache, lib) and the load() data toggles. It also covers lazy attributes such as laps, weather, race_control_messages, and results, and the supported year range.
  • Core API: full Session and get_session reference
  • Models API: the data classes a session returns
  • Events API: the event schedule used to resolve Grand Prix and session names
  • Payload Loader API: the pipeline a session uses to fetch payloads
Last modified on October 15, 2026