Skip to main content
The results.py script fetches race results including finishing positions, points awarded, and race outcomes for each driver.

Script Overview

Location: ~/workspace/source/results.py The script uses the RaceResultsFetcher class to:
  1. Fetch race results for specific rounds
  2. Handle rate limiting automatically
  3. Save results to the appropriate race directory
  4. Log all operations for debugging

API Endpoint

RaceResultsFetcher Class

Initialization

Rate-Limited Requests

The class implements adaptive rate limiting:

Fetching Race Information

Fetching Results

Main Fetch Method

Output Structure

Stored at: {year}/{race-name}/results.json

Usage Example

Basic Usage

Multiple Rounds

The script includes logging to both a file (race_results_fetch.log) and the console for easy monitoring.

Results Data Fields

Each result contains:
Not all fields are available for all races, especially historical data. Always check for the existence of fields before accessing them.

Logging Configuration

The script uses structured logging:

Events

Must run first to create race directories

Qualifying

Fetch qualifying results next