System Requirements
Python Version
F1 Stats Archive requires Python 3.7 or higher. The project uses modern Python features including:pathlibfor cross-platform file paths- Type hints and f-strings
- Context managers for file operations
Operating System
The project is compatible with:- Linux (Ubuntu, Debian, Fedora, etc.)
- macOS
- Windows 10/11
Installation Methods
Standard Installation
1
Clone the repository
2
Create a virtual environment (recommended)
Using a virtual environment keeps your project dependencies isolated:
3
Install dependencies
Install the required packages from The only dependency is:
requirements.txt:requests- For making HTTP requests to the Ergast API
4
Verify installation
Test that everything is working by importing the modules:
Configuration
API Settings
The Ergast API base URL is configured in each script. By default, all scripts use:The Ergast API is currently hosted at
api.jolpi.ca/ergast. The original ergast.com domain is no longer operational.Rate Limiting
All scripts include built-in rate limiting to comply with API restrictions:- Burst limit: 4 requests per second
- Sustained limit: 500 requests per hour
Directory Structure
By default, all scripts save data to the current working directory. You can customize the output location:Logging Configuration
Each script includes comprehensive logging to help you track progress and debug issues:race_results_fetch.log- Race results fetchingqualifying_results_fetch.log- Qualifying resultsdriver_standings_fetch.log- Driver pointslaptimes_fetch.log- Lap timing data
Customizing Season and Round Selection
Each script is configured to fetch specific seasons and rounds. Modify the__main__ section of each script:
Events Script
Results, Qualifying, and Points Scripts
Verification
After installation, verify everything works by running the events script:Troubleshooting
Import Errors
If you seeModuleNotFoundError: No module named 'requests':
Rate Limit Errors
If you see frequent rate limit warnings:- The scripts will automatically retry after 30 seconds
- Consider increasing the delay between requests
- Avoid running multiple scripts simultaneously
Permission Errors
If you encounter permission errors when creating directories:Missing Data
If race folders are created but contain no JSON files:- Check that the race has occurred (future races have no data)
- Verify your internet connection
- Check the log files for error messages
- The Ergast API may not have data for very recent races yet
Next Steps
Quick Start
Learn how to fetch your first F1 race data
API Reference
Explore all available scripts and methods