Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 98 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,123 @@
<p><img width=20% src="media/logo.png"></p>
<p><img width=100% src="media/logo-title-1.png"></p>

> [!NOTE]
> This package is not officially launched on pypi yet

iracing-garage
============

`iracing-garage` simplifies extracting data from iRacing API. The package includes all iRacing API endpoints.
# Home

## Installation
## Welcome to **iracing\_garage**! 🏎️

This is a simple and free Python wrapper around the [iRacing API](https://forums.iracing.com/discussion/15068/general-availability-of-data-api/p1),
created for the awesome iRacing community. Whether you're building a tool,
analyzing your races, or just love data — this is your pit crew in code form. 😎

---

## 🚀 Getting Started

The official documentation can be found [here](https://dangkv.github.io/iracing_garage/).

### 1. Install the package

Clone the repo:

```bash
git clone https://github.com/dangkv/iracing_garage.git
cd iracing_garage
```

Install dependencies:

```bash
pip install iracing-garage
pip install -r requirements.txt
```

(Optional: consider creating a virtual environment)

---

## Wiki
### 2. Authentication 🛡️

You'll need to log in with your iRacing email and password (this uses the same method the iRacing web portal does).

```python
from iracing_garage import iRacingGarage

email = 'maxv@gmail.com'
password = 'hotwheels'

iracing = iRacingGarage(email, password)
```

Do you need some help? Check out the articles on the [wiki](wwww.google.com).
> 🔒 *This iRacing Garage does not store your credentials. It's all handled securely at runtime.*

---

## Contributing
## 🔍 What Can You Do?


After logging in, you can access a bunch of data in JSON format from the iRacing API.
Here are some examples:

Please take a look at our [contributing](wwww.google.com) guidelines if you're interested in helping!
### Get Cars 🚗

```python hl_lines="1"
cars = iracing.car.get()
print(cars)
```

### Get Tracks 🏁

```python hl_lines="1"
tracks = iracing.track.get()
print(tracks)
```

### Get Driver Stats 📊

```python hl_lines="2"
cust_id = 123456
driver_data = iracing.stats.summary(cust_id)
print(driver_data)
```

### Get Race Results 🏆

```python hl_lines="3"
subsession_id = 654321
simsession_number = 0
results = iracing.results.get(subsession_id, simsession_number)
print(results)
```
#### Check out the [Data Endpoints](https://dangkv.github.io/iracing_garage/data-endpoints/) page for more data points!!

---

## 📬 Contact

* Maintainer: [dangkv](https://github.com/dangkv) + [hmkamel](https://github.com/hmkamel)

---

## 🏁 Final Lap

Enjoy the ride. 🏎️💨

[Getting Started](https://dangkv.github.io/iracing_garage/getting-started/){ .md-button }

<div class="grid cards" markdown>

- :fontawesome-brands-html5: __HTML__ for content and structure
- :fontawesome-brands-js: __JavaScript__ for interactivity
- :fontawesome-brands-css3: __CSS__ for text running out of boxes
- :fontawesome-brands-internet-explorer: __Internet Explorer__ ... huh?

</div>


## License
You can check out the full license [here](LICENSE)

Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Getting Started

### Requirements
* Python 3

### Steps
1. Install
2. Authenticate

---

#### How to Install
```
pip install iracing_garage
```

#### How to Authenticate
```
from iracing_garage import iRacingGarage


username = "<UR_USERNAME>"
password = "<UR_PASSWORD>"

iRacing = iRacingGarage(username, password)

```
116 changes: 99 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,106 @@
# Welcome to MkDocs
# Home

For full documentation visit [mkdocs.org](https://www.mkdocs.org).
## Welcome to **iracing\_garage**! 🏎️

## Commands
This is a simple and free Python wrapper around the [iRacing API](https://forums.iracing.com/discussion/15068/general-availability-of-data-api/p1), created for the awesome iRacing community. Whether you're building a tool, analyzing your races, or just love data — this is your pit crew in code form. 😎

* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.
---

## Project layout
## 🚀 Getting Started

mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
### 1. Install the package

# Code Block
```py title="main.py" linenums="1" hl_lines="1 3"
print("vroomvroom")
print("vrrrr")
print("3")
Clone the repo:

```bash
git clone https://github.com/dangkv/iracing_garage.git
cd iracing_garage
```

Install dependencies:

```bash
pip install -r requirements.txt
```

(Optional: consider creating a virtual environment)

---

### 2. Authentication 🛡️

You'll need to log in with your iRacing email and password (this uses the same method the iRacing web portal does).

```python
from iracing_garage import iRacingGarage

email = 'maxv@gmail.com'
password = 'hotwheels'

iracing = iRacingGarage(email, password)
```

> 🔒 *This iRacing Garage does not store your credentials. It's all handled securely at runtime.*

---

## 🔍 What Can You Do?


After logging in, you can access a bunch of data in JSON format from the iRacing API.
Here are some examples:

### Get Cars 🚗

```python hl_lines="1"
cars = iracing.car.get()
print(cars)
```

### Get Tracks 🏁

```python hl_lines="1"
tracks = iracing.track.get()
print(tracks)
```

### Get Driver Stats 📊

```python hl_lines="2"
cust_id = 123456
driver_data = iracing.stats.summary(cust_id)
print(driver_data)
```

### Get Race Results 🏆

```python hl_lines="3"
subsession_id = 654321
simsession_number = 0
results = iracing.results.get(subsession_id, simsession_number)
print(results)
```
#### Check out the [Data Endpoints](https://dangkv.github.io/iracing_garage/data-endpoints/) page for more data points!!

---

## 📬 Contact

* Maintainer: [dangkv](https://github.com/dangkv) + [hmkamel](https://github.com/hmkamel)

---

## 🏁 Final Lap

Enjoy the ride. 🏎️💨

[Getting Started](getting-started.md){ .md-button }

<div class="grid cards" markdown>

- :fontawesome-brands-html5: __HTML__ for content and structure
- :fontawesome-brands-js: __JavaScript__ for interactivity
- :fontawesome-brands-css3: __CSS__ for text running out of boxes
- :fontawesome-brands-internet-explorer: __Internet Explorer__ ... huh?

</div>
Binary file added media/logo-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/logo-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/logo-title-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/logo-title-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed media/logo.png
Binary file not shown.
22 changes: 18 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
site_name: iRacing Garage
site_url: https://dangkv.github.io/iracing_garage/

theme:
name: material
language: en
logo: ./media/logo-title-2.png
features:
- navigation.tabs
- navigation.sections
- toc.integrate
- navigation.indexes
- navigation.top
- navigation.tracking
- toc.integrate
- search.suggest
- search.share
- search.highlight
- content.tabs.link
- content.code.copy
language: en
- content.code.annotate

palette:
- scheme: default
toggle:
icon: material/toggle-switch-off-outline
icon: material/weather-sunny
name: Switch to dark mode
- scheme: slate
toggle:
icon: material/toggle-switch
icon: material/weather-night
name: Switch to light mode
# plugins:
# - typeset
# - search

extra:
social:
- icon: fontawesome/brands/github-alt
Expand All @@ -29,6 +40,7 @@ extra:
link: https://www.linkedin.com/in/dangkhoivo/

markdown_extensions:
- md_in_html
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
Expand All @@ -41,6 +53,8 @@ markdown_extensions:
- pymdownx.superfences
- pymdownx.mark
- attr_list
- toc:
permalink: true

copyright: |
&copy; 2024 <a href="https://github.com/dangkv" target="_blank" rel="noopener">Dang Khoi Vo</a>