A simple Python script to experiment with the openF1 API without authentication keys. This script fetches and prints some public data from the openF1 API, such as session and driver information.
- Fetches F1 session data for a specified year
- Fetches driver data for the latest session and meeting
- Handles API errors gracefully
- Python 3.x
- requests library
Install dependencies with:
pip install requestsRun the script directly:
python openf1_experiment.pyThe script will output the number of sessions and drivers fetched from the openF1 API, and print sample data to the console.
Fetched 0 sessions from openF1 API:
Fetched 5 drivers from openF1 API:
{'driver_number': '44', 'name': 'Lewis Hamilton', ...}
...
This project is for educational and experimental use.