Skip to main content
rlstatsapi-logo

Rocket League Stats API

Code style: black PyPI version Pylint Downloads

rlstatsapi is a small Python client for reading live Rocket League Stats API events over a local TCP socket.

Install

From PyPI:

pip install rlstatsapi

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

All events demo

UI

UI demo

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

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

Contributors

Metadata

Release files for rlstatsapi 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rlstatsapi 0.1.7
File Size Uploaded Provenance Actions
rlstatsapi-0.1.7.tar.gz 27.1 kB Without provenance Details for rlstatsapi-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rlstatsapi 0.1.7
File Interpreter ABI Platform Actions
rlstatsapi-0.1.7-py3-none-any.whl Python 3 none any Details for rlstatsapi-0.1.7-py3-none-any.whl

Total release size: 51.1 kB

Release files / rlstatsapi-0.1.7.tar.gz

Download URL rlstatsapi-0.1.7.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b96f5ec1ae410575a1fd8aad1d9e172c90d6d19eec890c7f37671ac686ba1963
BLAKE2b-256 checksum
How to use checksums
84e7fa6a7938fa10a2e19ef43941f6248e5e5983ba2140737ce11065ffc8a612
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.7-py3-none-any.whl

Download URL rlstatsapi-0.1.7-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6870023aba025b8b779826d5f3c25b9b4f1ac5a5419dba9f4d16caed6e541d99
BLAKE2b-256 checksum
How to use checksums
7f87ad4e01ed7c8e5ffaba2ef1297d8bbf4879bd93f52ad9e3c9982d2bd48dc3
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.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page