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/RocketLeagueStatsAPI
- Release history: CHANGELOG.md
Install
From PyPI:
pip install rlstatsapi
From GitHub:
pip install git+https://github.com/manucabral/RocketLeagueStatsAPI.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
CLI
rlstatsapi status
rlstatsapi enable --port 49123 --rate 30
rlstatsapi listen --event GoalScored
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/RocketLeagueStatsAPI
- Examples: examples/
- Release history: CHANGELOG.md
Notes
- In current Rocket League builds this endpoint behaves like a TCP JSON stream in practice.
- 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.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rlstatsapi-0.1.6.tar.gz | 22.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rlstatsapi-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.5 kB
Release files / rlstatsapi-0.1.6.tar.gz
| Download URL | rlstatsapi-0.1.6.tar.gz |
|---|---|
| Size | 22.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
003d8feda3f7b7a6cd808527e82bd110d6eaab6e1e8fe5cedfffb4c4ff56e52e
|
|
BLAKE2b-256 checksum How to use checksums |
c1b62054a2e72f251da021b8afe03283c0ddffaf2ba441cd4c99b39d205fb7a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / rlstatsapi-0.1.6-py3-none-any.whl
| Download URL | rlstatsapi-0.1.6-py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ded3796d51bfbe144af861226417cebf7e4f8a6c437ffbffc9f52c8d700a006
|
|
BLAKE2b-256 checksum How to use checksums |
92092e59382fe040f0f46dc70d720933223625c354b019bc472670ced4334e7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|