Rocket League Stats API client
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 rlstatsapi-0.1.6.tar.gz.
File metadata
- Download URL: rlstatsapi-0.1.6.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
003d8feda3f7b7a6cd808527e82bd110d6eaab6e1e8fe5cedfffb4c4ff56e52e
|
|
| MD5 |
724e8c90c6924c4ba4e6dac5dab7e0c4
|
|
| BLAKE2b-256 |
c1b62054a2e72f251da021b8afe03283c0ddffaf2ba441cd4c99b39d205fb7a7
|
File details
Details for the file rlstatsapi-0.1.6-py3-none-any.whl.
File metadata
- Download URL: rlstatsapi-0.1.6-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ded3796d51bfbe144af861226417cebf7e4f8a6c437ffbffc9f52c8d700a006
|
|
| MD5 |
d7c07bb88e78e89372475612dfc38d84
|
|
| BLAKE2b-256 |
92092e59382fe040f0f46dc70d720933223625c354b019bc472670ced4334e7a
|