Skip to main content

No project description provided

Reason this release was yanked:

Testing Publish

Project description

Quality Gate Status

CodeQL

Test Suite

Release

iracing-data-client

A Python Client Library for working with iRacing Data API.

This library provides communiction & error handling with the iRacing Data API.

Quick Start

JSON formatted data returned by iRacing is deserialized as either a list or dict using json.loads

import iracing_data_client.auth as auth
from iracing_data_client.data.constants import Constants
from iracing_data_client.data.member import Member
from iracing_data_client.data.league import League

# Authenticate with iRacing
iracing_username = os.environ.ge('IRACING_USERNAME')
iracing_password = os.environ.ge('IRACING_PASSWORD')

http_session = auth.login(iracing_username, iracing_password)


# iRacing Constants
constants = Constants(http_session)
print(constants.categories)
print(constants.divisions)
print(constants.event_types)


# My iRacing Member Info
member = Member(http_session)
print(member.get_profile())


# My iRacing League Directory
league = League(http_session)
print(league_instance.get_directory())

Useful Information

iRacing Data API Documentation

iRacing Forums Data API Discussion

iRacing Auth Portal

Colaborating

Feel free to fork this repo and commit back via a Pull Request.

We have provided a VSCode devcontainer to make getting started as simple as possible. Use your own local machine or a GitHub CodeSpace.

The python dependancies and packaging is managed using Poetry.

Tests are managed and executed using pytest.

Code formatting is performed by black.

Linting is performed by pylint.

Unit Tests

Unit Tests mock interactions with the iRacing Data API and can be executed offline. Create unit tests to exercise logic and error handling.

Running pytest from the VSCode Terminal:

poetry run pytest tests/unit/

Integration Tests

Integration Tests will connect to the iRacing Service and perform a shake down of the base data classes using live data.

When testing locally, provide the following values in a .env file in the root of the project.

IRACING_USERNAME=<your email address>
IRACING_PASSWORD=<your iRacing password>
IRACING_MEMBER_ID=<your iRacing Member Id>

Running pytest from the command line (integration tests only):

poetry run pytest tests/integration

Project details


Download files

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

Source Distribution

iracing_client-0.1.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

iracing_client-0.1.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file iracing_client-0.1.1.tar.gz.

File metadata

  • Download URL: iracing_client-0.1.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1039-azure

File hashes

Hashes for iracing_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a6ee5d355ccaa2be186403cf4e2cfc23572f826632736da27fc091384b43123f
MD5 0e73277b3af6b0bd0a606a80847a3ef1
BLAKE2b-256 e4e31018b94b704861ef8db008398af2312dfeb6e3c87c2031d1ae91c283f2fc

See more details on using hashes here.

File details

Details for the file iracing_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iracing_client-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1039-azure

File hashes

Hashes for iracing_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 910203a37e3bdba632f927c7a1a536d896dd6190b8940032ec5b695bb2a1b554
MD5 24d66ecbf00161b277cd0e0d8721f1aa
BLAKE2b-256 bbc4c8938490c30ad0cb3f8a4d77f1368fddcf39ecb87e2226d2f9fa3c56dc7a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page