Skip to main content

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.

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.1 Thanks to @fuzzwah and @nylanderj for these changes

  • Added a "silent" option to avoid printing to console where necessary
  • Added a new driver_list endpoint, which replaces the old CSV downloads previously provided by iRacing

1.2.0 Thanks to @ablesm2 for these changes.

  • Added missing endpoints
    • time_attack_member_season_results() stats_member_recap() stats_member_division() series_past_seasons() league_roster()
  • Removed check for cust_id on methods that default the currently logged in member:
    • stats_member_summary() stats_member_yearly() stats_member_recent_races()

1.1.6

  • More rate limiting fixes

1.1.5

  • Add rate limiting to _get_resource

1.1.4

  • Fix result_search_series to correctly include finish_range_begin as an option
  • Fix season_spectator_subsessionids to correctly return the IDs rather than the object

1.1.3

  • Bug fix for some 5xx errors that are thrown by iRacing
  • Added the season_spectator_subsessionids() endpoint

1.1.0

  • Added docstrings to all methods for developer experience
  • Renamed series() to get_series() for consistency. Breaking change: For that same consistency, series has been reimplemented as a property which returns the series with their assets. To amend your implementation, either switch to get_series() or remove any brackets in your call of series.
  • Renamed get_carclass() to get_carclasses() to be more consistent with other endpoints. NOTE: get_carclass() will be removed in a future release.
  • Added assets to the returned data of tracks. If you prefer not to get those assets, use get_tracks().
  • Removed redundant cookie handling code, as that is all handled within requests.Session
  • Fixed a ratelimiting error
  • Fixed a ratelimiting bug
  • Fixed a bug related to empty results
  • Improved handling of results

1.0.6

  • Bug fix in result_lap_data method, which will now return an empty list for any cust_id/subsession_id combinations for which laps were not turned.

1.0.5

  • Added a wait when hitting a rate limit

1.0.4

  • Bug fix: Previously an attempt wouldn't be retried if the authentication data became stale. This release fixes that

1.0.3

1.0.2

  • Adjusted login flow to avoid logging in on instantiation of an irDataClient object
  • Login now happens either on the initial call to an iRacing endpoint, or whenever a 401 Unauthorized response is received form iRacing

1.0.1

  • Adjusted result_search_series to allow searches by date range without using season years and quarters.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iracingdataapi-1.2.1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iracingdataapi-1.2.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file iracingdataapi-1.2.1.tar.gz.

File metadata

  • Download URL: iracingdataapi-1.2.1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for iracingdataapi-1.2.1.tar.gz
Algorithm Hash digest
SHA256 321c209620d52085840c4b6dec1c9fea0a0f46264bab2cff6564f14df0119c6e
MD5 064cc2cb7836cfc008054a9465e205f9
BLAKE2b-256 8a6c84e677a48d551916b8308e6e2d44c9b2296902b21585784316880d6d268e

See more details on using hashes here.

File details

Details for the file iracingdataapi-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: iracingdataapi-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for iracingdataapi-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8dc5e7efe112439beb0d16ce9bd1a4948242d6413f92952d16a19f5c0e5b4cd2
MD5 e9cdb5a3364d281a19e0f4033b52be07
BLAKE2b-256 0a3f9cc653a5a70876976e7dc681e6e053b09ebb225a7c0922eb27e4bd4274ec

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.4

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

1.2.3

2 files

1.2.2

2 files

This release

1.2.1 This release

2 files

1.2.0

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

1 file

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page