Python bindings for RocketSim - Rocket League physics simulation
Project description
nitro-sim
Python bindings for RocketSim - High-performance Rocket League physics simulation.
Quick Start
# Install in development mode
uv sync
# Verify installation
uv run python -c "import nitro as rs; print('Version:', rs.__version__)"
# Run tests
uv run pytest tests/
Usage
Direct API
import nitro as rs
# Initialize RocketSim
rs.init("collision_meshes")
# Create arena
arena = rs.Arena.create(rs.GameMode.SOCCAR, tick_rate=120.0)
# Add cars
car1 = arena.add_car(rs.Team.BLUE, rs.CAR_CONFIG_OCTANE)
car2 = arena.add_car(rs.Team.ORANGE, rs.CAR_CONFIG_DOMINUS)
# Set controls
car1.controls.throttle = 1.0
car1.controls.boost = True
# Simulate
arena.step(120) # 1 second
# Get state
state = car1.get_state()
print(f"Position: {state.pos}")
print(f"Velocity: {state.vel.length()}")
PettingZoo API (for Multi-Agent RL)
from pettingzoo_env import parallel_env
# Create 2v2 environment
env = parallel_env(num_blue=2, num_orange=2)
# Reset
observations, infos = env.reset(seed=42)
# Training loop
while env.agents:
actions = {
agent: policy(observations[agent]) # Your RL policy here
for agent in env.agents
}
observations, rewards, terminations, truncations, infos = env.step(actions)
env.close()
Features
- Complete RocketSim API - All major types and functions exposed
- PettingZoo API - Multi-agent RL compatible interface
- Ball Prediction - Predict ball trajectories for AI/bots
- Event Tracking - Detect shots, goals, saves, and assists
- Callbacks - React to goals, bumps, and game events
- Type hints - Full LSP/autocomplete support with
.pyistubs - Pythonic - Snake_case naming, properties, and operators
- Fast - Direct C++ bindings with minimal overhead
- Tested - 85 passing tests covering all functionality
Examples
See the examples/ folder for:
- example_advanced.py - Ball prediction, event tracking, callbacks
- test_autocomplete.py - Basic usage and IDE autocomplete demo
Building
# Development install
uv sync
# Build wheel
uv build
# Install from wheel
pip install dist/*.whl
See BUILD.md for detailed build instructions and troubleshooting.
Testing
# Run all tests (auto-downloads collision meshes)
uv run pytest tests/
# Run without collision meshes
uv run pytest tests/ -k "not simulation and not boost and not prediction"
See tests/README.md for more testing options.
Requirements
- Python 3.12+
- CMake 3.15+
- C++20 compiler
- Collision meshes (auto-downloaded in tests)
Test Results
$ uv run pytest tests/
================= 85 passed, 2 skipped in 2.09s =================
Includes tests for:
- Core API (72 tests)
- PettingZoo API (13 tests)
License
This project provides Python bindings for RocketSim. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nitro_sim-0.1.0.tar.gz.
File metadata
- Download URL: nitro_sim-0.1.0.tar.gz
- Upload date:
- Size: 492.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1be924afae89430356f5b0b319ce751d53e9352a0a92c5c6b2baea8e79808b6
|
|
| MD5 |
ca08f879ae437a37f717ad29e655fcc0
|
|
| BLAKE2b-256 |
a030746ea9769f1ee58c77b8bdfd9cf87d87d1d20f3967ff66d452917723710a
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0.tar.gz:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0.tar.gz -
Subject digest:
a1be924afae89430356f5b0b319ce751d53e9352a0a92c5c6b2baea8e79808b6 - Sigstore transparency entry: 768237957
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nitro_sim-0.1.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: nitro_sim-0.1.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 470.6 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
401898e55604e271feb247dcce0e8e8668502939461d17715f5ddb18d05a4589
|
|
| MD5 |
1890f903e8bb9b6e2414db204910e9a2
|
|
| BLAKE2b-256 |
ea8c31ed95144db3bc3f7fba01289c0f15af90f06dd95cd2e4e8bbcd1c7f384d
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0-cp313-cp313-win_amd64.whl:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0-cp313-cp313-win_amd64.whl -
Subject digest:
401898e55604e271feb247dcce0e8e8668502939461d17715f5ddb18d05a4589 - Sigstore transparency entry: 768238021
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nitro_sim-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: nitro_sim-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 731.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af71e2e287d385af2adaf092b3db9f180a6905b9a9e4bc4ec7cd517e2101c67a
|
|
| MD5 |
d46200d8d212d6ca849fee506c9aba2b
|
|
| BLAKE2b-256 |
6cd557fe0bdd4d6a7409bc755e7a788a372da5740dd4d9b2f0b8293ceade5b9d
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
af71e2e287d385af2adaf092b3db9f180a6905b9a9e4bc4ec7cd517e2101c67a - Sigstore transparency entry: 768237975
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nitro_sim-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: nitro_sim-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 472.5 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
067f07450293939c83dcf052f2a6d1b59de52a5403f322be6312897175d951ca
|
|
| MD5 |
7dbe8e77daaf346f74f56576e55e5889
|
|
| BLAKE2b-256 |
b2937446fdc9c3ef7fdfb178a392863dba60fcca368b9a2dd30530d21b65de64
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
067f07450293939c83dcf052f2a6d1b59de52a5403f322be6312897175d951ca - Sigstore transparency entry: 768238033
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nitro_sim-0.1.0-cp313-cp313-macosx_10_15_x86_64.whl.
File metadata
- Download URL: nitro_sim-0.1.0-cp313-cp313-macosx_10_15_x86_64.whl
- Upload date:
- Size: 530.2 kB
- Tags: CPython 3.13, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa530b173b17b439f7bbf8f55f64fe39c438d109d209af4a0974f8d85e9c54f1
|
|
| MD5 |
126e965618e2a68f17cc9d8ceee32810
|
|
| BLAKE2b-256 |
1d5d1364edd0f8f41ca9af703040784af6e65d56742907065b25bc2f728ed668
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0-cp313-cp313-macosx_10_15_x86_64.whl:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0-cp313-cp313-macosx_10_15_x86_64.whl -
Subject digest:
fa530b173b17b439f7bbf8f55f64fe39c438d109d209af4a0974f8d85e9c54f1 - Sigstore transparency entry: 768238008
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nitro_sim-0.1.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: nitro_sim-0.1.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 470.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc43a644ab896b168aed9dae28eb22c177f0941902f2084091ac9881c684c2e1
|
|
| MD5 |
0b2ae52f87cbec40a3bc32c0a3b83d35
|
|
| BLAKE2b-256 |
1bc41fcc7c5ba6f0b78118032c576b8ac3d012b1bb4f058172f362e5af52ca15
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0-cp312-cp312-win_amd64.whl:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0-cp312-cp312-win_amd64.whl -
Subject digest:
bc43a644ab896b168aed9dae28eb22c177f0941902f2084091ac9881c684c2e1 - Sigstore transparency entry: 768238056
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nitro_sim-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: nitro_sim-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 731.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da0164b54219fca2cdcaa847991719bbb265c3b2225d705fce869b9b95ebf9b4
|
|
| MD5 |
8b12e5b71a7cfed8e38f131ec7ce1883
|
|
| BLAKE2b-256 |
0eaca79ec43866b61befb89ac285032d015f87559bd17e5869bbf4dbe6fd0e24
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
da0164b54219fca2cdcaa847991719bbb265c3b2225d705fce869b9b95ebf9b4 - Sigstore transparency entry: 768238045
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nitro_sim-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: nitro_sim-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 472.5 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10b1d8d2c7150fac090978c64ba4807bbe5a4a18c2c01695ae9e60de838595d8
|
|
| MD5 |
e0260e23c95d3593288b3b8f8eddb90e
|
|
| BLAKE2b-256 |
0d085b314bff623aea77df8cadf3bee4a6b92519304c822eeb2c5f4d324ae855
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
10b1d8d2c7150fac090978c64ba4807bbe5a4a18c2c01695ae9e60de838595d8 - Sigstore transparency entry: 768237987
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nitro_sim-0.1.0-cp312-cp312-macosx_10_15_x86_64.whl.
File metadata
- Download URL: nitro_sim-0.1.0-cp312-cp312-macosx_10_15_x86_64.whl
- Upload date:
- Size: 530.3 kB
- Tags: CPython 3.12, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d520eb57336a0f9420a353be5e8fbf6f64755a45f56be42ba407aae725440b01
|
|
| MD5 |
a40d0cb2eed9a5b9613988711e377ad6
|
|
| BLAKE2b-256 |
1c4eba2910a05b2665797ab9584b2921a96f581b42d2a90299b94d2a5fe2d613
|
Provenance
The following attestation bundles were made for nitro_sim-0.1.0-cp312-cp312-macosx_10_15_x86_64.whl:
Publisher:
build-wheels.yml on 2ToTheNthPower/nitro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitro_sim-0.1.0-cp312-cp312-macosx_10_15_x86_64.whl -
Subject digest:
d520eb57336a0f9420a353be5e8fbf6f64755a45f56be42ba407aae725440b01 - Sigstore transparency entry: 768237996
- Sigstore integration time:
-
Permalink:
2ToTheNthPower/nitro@1b0c696fab3707088e6e137990b96775e667a103 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/2ToTheNthPower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@1b0c696fab3707088e6e137990b96775e667a103 -
Trigger Event:
push
-
Statement type: