-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Esterni/pyracing
- Loading branch information
Showing
1 changed file
with
7 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,14 @@ | ||
# About | ||
This package is an asynchronous API "wrapper" for retrieving data from iRacing. We use the term "wrapper" loosely as iRacing does not yet have an officially documented API; However, we've done our best to build something that might resemble one. | ||
|
||
This package is an API wrapper/client for retrieving data from iRacing. We use the term "wrapper" loosely because iRacing does not yet have an officially documented API. However, we've done our best to build something that might resemble an actual API. | ||
The goal of this project is to provide access to iRacing stats in a manner that is convienent, flexible, and efficient. In using this package, if you find something in its design that goes against these goals, **we want to know.** | ||
|
||
Please feel free to open issues, offer suggestions, or fork and submit a pull request to help polish things up here. We only ask that you be willing to openly discuss things in a respectful manner. If you'd like to chat in Discord, I can be reached in the [iRacing Open Wheel Discord](https://discord.gg/UwnhM7w) (nearing 1000 members!). My username is Jacob Anderson7#4903. I'd be happy to hear from those interested in this project and if enough people reach out I'll make a section just for this project. | ||
The contributors of this project use Discord as the primary means of communication; The [iRacing Open Wheel server](https://discord.gg/UwnhM7w) was created by the author of this project and hosts the channels for discussion there. When joining, please ask Jacob Anderson for the role to see the appropriate channels. | ||
|
||
# Usage | ||
```py | ||
import pyracing | ||
import pyracing.constants as ct | ||
# Documentation & Discussion | ||
All documentation for this project is available through the [Github Pages project site](https://esterni.github.io/pyracing/). | ||
|
||
# Storing in system env is another option and use os.getenv() to retrieve them. | ||
username = 'username' | ||
password = 'password' | ||
|
||
ir = pyracing.client.Client('username', 'password') # or any other method | ||
await ir.authenticate() | ||
|
||
iRating = await ir.get_irating(ct.Category.road, custid) | ||
|
||
current_irating = iRating.current() | ||
``` | ||
|
||
## See the wiki page [List of Functions](https://github.com/Esterni/pyracing/wiki/List-of-functions) for a list of what is available to use. | ||
|
||
FILES | ||
===== | ||
|
||
- client.py : This is where the main class is defined. | ||
- constants.py : Useful constants used in request fields sent to the service. | ||
|
||
REQUIREMENTS | ||
============ | ||
|
||
Python 3.8+ (with network access) | ||
# Dependancies | ||
[httpx](https://www.python-httpx.org/) = 0.13.x |