jasondilworth56 / iracingdataapi

A simple wrapper around the iRacing General Data API
https://www.github.com/jasondilworth56/iracingdataapi
MIT License
66 stars 16 forks source link
iracing

Coverage Quality Gate Status

About

iracing-data-api is a simple Python wrapper around the General Data API released by iRacing in January 2022 and documented here.

The client allows easy access to some of the most useful endpoints of the data API.

Pre-installation

Ensure that you have marked your account with iRacing for legacy authentication - accounts with 2FA will not work with the API. This is a limitation of iRacing, not this wrapper.

Installation

pip install iracingdataapi

Examples

from iracingdataapi.client import irDataClient

idc = irDataClient(username=[YOUR iRACING USERNAME], password=[YOUR iRACING PASSWORD])

# get the summary data of a member
idc.stats_member_summary(cust_id=20979)

# get latest results of a member
idc.stats_member_recent_races(cust_id=209179)

# get all laps for a specific driver in a race
idc.result_lap_data(subsession_id=43720351, cust_id=209179)

All available methods of irDataClient are included in client.py.

Contributing

I welcome all pull requests for improvements or missing endpoints over time as they are added by iRacing.

Changelog

1.2.2

1.2.0 Thanks to @ablesm2 for these changes.

1.1.6

1.1.5

1.1.4

1.1.3

1.1.0

1.0.6

1.0.5

1.0.4

1.0.3

1.0.2

1.0.1