Rocket League Stats API
rlstatsapi is a small Python client for reading live Rocket League Stats API events over a local TCP socket.
- Full docs: manucabral.github.io/rlstatsapi
- Release history: CHANGELOG.md
Install
From PyPI:
pip install rlstatsapi
With the faster JSON backend (orjson, about twice the decoding speed):
pip install "rlstatsapi[fast]"
From GitHub:
pip install git+https://github.com/manucabral/rlstatsapi.git
Rocket League setup
Automatic setup from Python:
from rlstatsapi import configure_stats_api
configure_stats_api(enabled=True, port=49123, packet_send_rate=30)
Manual setup:
Documents\My Games\Rocket League\TAGame\Config\TAStatsAPI.ini
[TAGame.MatchStatsExporter_TA]
Port=49123
PacketSendRate=30
In both cases, restart Rocket League after changing the config file.
Config discovery is currently Windows-first and targets common user config locations.
Quick start
import asyncio
from rlstatsapi import StatsClient
async def main() -> None:
async with StatsClient() as client:
client.on_any(lambda msg: print(msg.event, msg.data))
await asyncio.Event().wait()
asyncio.run(main())
Demos
All events
UI
Commands
The game accepts commands on the same socket (Rocket League v2.72 or newer):
async with StatsClient() as client:
await client.wait_for("UpdateState")
await client.set_hud_visibility(False)
await client.change_pov(focus="Ball", perspective="Fly")
Available: change_pov, load_replay, seek_replay, set_game_speed,
set_hud_visibility and set_match_paused. See the
commands guide.
CLI
rlstatsapi status
rlstatsapi enable --port 49123 --rate 30
rlstatsapi listen --event GoalScored
rlstatsapi send SetHUDVisibility '{"bVisible": false}'
You can also listen to multiple events:
rlstatsapi listen --event GoalScored --event MatchEnded --event MatchCreated
Typing
For the best editor experience, use cast_event_data(...) or msg.as_type(...).
from rlstatsapi.models import EventMessage
from rlstatsapi.types import GoalScoredPayload, cast_event_data
def on_goal(msg: EventMessage) -> None:
data: GoalScoredPayload = cast_event_data("GoalScored", msg.data)
print(data.get("Scorer", {}).get("Name"))
More
- Full docs: manucabral.github.io/rlstatsapi
- Examples: examples/
- Release history: CHANGELOG.md
Notes
- The client uses the game's TCP socket (
Port). The WebSocket listener (WebPort) is not needed. - Some fields, such as
MatchGuid, are only present in online/LAN contexts.
Disclaimer
This project is an independent, community-made library and is not affiliated with, endorsed by, or sponsored by Psyonix or Epic Games.
Rocket League and related trademarks are the property of their respective owners.
Use this library at your own risk and in compliance with Rocket League’s terms and policies.
Contributors
Metadata
Release files for rlstatsapi 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rlstatsapi-0.1.8.tar.gz | 36.9 kB | Without provenance | Details for rlstatsapi-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rlstatsapi-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for rlstatsapi-0.1.8-py3-none-any.whl |
Total release size: 68.2 kB
Release files / rlstatsapi-0.1.8.tar.gz
| Download URL | rlstatsapi-0.1.8.tar.gz |
|---|---|
| Size | 36.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b2a3faa79ba63f5a1aae3a7e4f69f3a10bc23802cfe8b2e3f81aabf36d40d54
|
|
BLAKE2b-256 checksum How to use checksums |
aeae0d7441c57150f7b5bfde1a29c96809b5486d9a5562f1c3718924b24624d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / rlstatsapi-0.1.8-py3-none-any.whl
| Download URL | rlstatsapi-0.1.8-py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5bab918ab217112da818c35c8ec7c01300c21fcd4c3cc5d15d1c0b4f3403e7d
|
|
BLAKE2b-256 checksum How to use checksums |
0dd659d249cd2769d54ea7b2e6825a9911fbbb50d30aa5d927d941359246c84b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for rlstatsapi 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.