Skip to main content

Python bindings for the Rocket League replay processing library subtr-actor.

Project description

subtr-actor-py

Python bindings for subtr-actor, a Rocket League replay processing library.

Installation

pip install subtr-actor-py

Usage

import subtr_actor

# Parse a replay file to get raw replay data
replay = subtr_actor.parse_replay(open("path/to/replay.replay", "rb").read())

# Get numerical data as numpy ndarray (useful for ML)
meta, ndarray = subtr_actor.get_ndarray_with_info_from_replay_filepath(
    "path/to/replay.replay",
    global_feature_adders=["BallRigidBody"],  # optional
    player_feature_adders=["PlayerRigidBody", "PlayerBoost", "PlayerAnyJump"],  # optional
    fps=10.0,  # optional, default is 10.0
    dtype="float16"  # optional: float16|float32|float64 (default float32)
)

# Get column headers to understand the ndarray structure
headers = subtr_actor.get_column_headers(
    global_feature_adders=["BallRigidBody"],
    player_feature_adders=["PlayerRigidBody", "PlayerBoost"]
)

# Get replay metadata without processing all frames (faster)
meta = subtr_actor.get_replay_meta("path/to/replay.replay")

# Get structured frame-by-frame data
frames_data = subtr_actor.get_replay_frames_data("path/to/replay.replay")

API Reference

parse_replay(data: bytes) -> dict

Parse raw replay bytes and return the complete replay structure.

get_ndarray_with_info_from_replay_filepath(filepath, global_feature_adders=None, player_feature_adders=None, fps=None, dtype=None) -> tuple[dict, numpy.ndarray]

Process a replay file and return metadata plus a numpy ndarray of features.

Parameters:

  • filepath - Path to the replay file
  • global_feature_adders - List of global feature names (default: ["BallRigidBody"])
  • player_feature_adders - List of player feature names (default: ["PlayerRigidBody", "PlayerBoost", "PlayerAnyJump"])
  • fps - Frames per second for processing (default: 10.0)
  • dtype - Output ndarray dtype string: float16/f16, float32/f32, float64/f64 (default: float32)

get_replay_meta(filepath, global_feature_adders=None, player_feature_adders=None) -> dict

Get replay metadata without processing frame data (faster than full processing).

get_column_headers(global_feature_adders=None, player_feature_adders=None) -> dict

Get column header information for understanding ndarray structure.

get_replay_frames_data(filepath) -> dict

Get structured frame-by-frame game state data.

Feature Adders

See the subtr-actor documentation for available feature adder names.

Common global features: BallRigidBody, GameTime

Common player features: PlayerRigidBody, PlayerBoost, PlayerAnyJump, PlayerDoubleJump

Building from Source

Requirements:

  • Rust toolchain
  • maturin
  • just (command runner)
# Clone the repository
git clone https://github.com/rlrml/subtr-actor.git
cd subtr-actor

# Build the Python package
just build-python

# Or for development (editable install)
cd python && maturin develop

Monorepo Dependency Management

This package is part of the subtr-actor monorepo. The Cargo.toml uses a dual dependency specification:

[dependencies.subtr-actor]
path = ".."
version = "0.1.10"

This allows:

  • Local development: Cargo uses the path dependency, so changes to the main subtr-actor crate are immediately available for testing
  • Publishing: crates.io/PyPI strips the path and uses the version, ensuring the published package depends on the published crate

Use just bump <version> to update all versions in sync (workspace version and dependency versions).

Publishing

To publish all packages in the correct order:

just publish-all  # Publishes: Rust crate -> Python bindings -> JS bindings

Or publish individually:

just publish-rust    # Publish main Rust crate first
just publish-python  # Then publish Python bindings

Important: The main subtr-actor Rust crate must be published to crates.io before publishing the bindings, as the published bindings depend on the published crate version.

License

MIT

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

subtr_actor_py-0.1.14.tar.gz (9.7 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

subtr_actor_py-0.1.14-cp314-cp314-macosx_11_0_arm64.whl (738.3 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

subtr_actor_py-0.1.14-cp312-cp312-win_amd64.whl (609.8 kB view details)

Uploaded CPython 3.12Windows x86-64

subtr_actor_py-0.1.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (805.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (807.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (807.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.14-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (810.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (823.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

subtr_actor_py-0.1.14-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (810.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

Details for the file subtr_actor_py-0.1.14.tar.gz.

File metadata

  • Download URL: subtr_actor_py-0.1.14.tar.gz
  • Upload date:
  • Size: 9.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for subtr_actor_py-0.1.14.tar.gz
Algorithm Hash digest
SHA256 aef838c21f6ab34b6644b7937bc6a20ebef8ade9982d65c4e043e2e33a7002ec
MD5 ae8bdd09c5a9725a747c1fd04ce92cad
BLAKE2b-256 0aca149a3f3ec7c28f65718c6111833ce6b365bb798564b6819eddde50dbe552

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14.tar.gz:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subtr_actor_py-0.1.14-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.14-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 421796ccdfc0a7f3db0c007ad81ea2af98c57b2ef425b60dba81d1bbc3bc2516
MD5 cba931a05fb385edc79b5beb5306018e
BLAKE2b-256 1dd8b927a0cb35c38bfd87c9ff35329bba30fd2f838345d7900645cf2abd0a9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subtr_actor_py-0.1.14-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0b36fb046c3b63fff032f599667df5201a35489f16a0fb06c58aa63e13105ca7
MD5 3d327071df4d2ce23913dbe43c535c76
BLAKE2b-256 c40c4e522bb2f79c2a6564a5222bdb5d288e0b0a38e77fcdaaaecf2abbccedf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14-cp312-cp312-win_amd64.whl:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subtr_actor_py-0.1.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 45ea9af0366cc62bfb54a5471599c9ffacf6e2f40c347a56fd511d943f15a24f
MD5 b5664de9de7f46713a6993f0354a2def
BLAKE2b-256 15e4bf817308fad930008c26c5109ff3746f14c528cb0809d6a61ed25bad4608

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subtr_actor_py-0.1.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 349ea7c5debc243b64d92fa39410b980c7927d26ed1e43e14b1f8c5a2ab3fa7d
MD5 480c6fb4992f7f4ea1544ca3ea841b99
BLAKE2b-256 8c50e725e4711117ffd2b0e25076f7319ae5ecf15501b5c7e8eaf14f010e3fdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subtr_actor_py-0.1.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0267e47e984aac7e4ecea9440dcf6fa3023da098cbdb248a9eba4fc92855b6cc
MD5 bfd34a54ae9b936101cc84ab132442b9
BLAKE2b-256 7b48aff2e833ce440fdc075761c08042ed57dae343dec1330fddee2a8472edc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subtr_actor_py-0.1.14-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.14-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c2ef2a7bad0fcb1c4340fb02f74007781c4ae102ace1c4cb38c987c4d7c1093d
MD5 7ffea630d9e2bb7b52b50b5c855078d6
BLAKE2b-256 126d642bd611fdcd070b05bb026c338cd6e3e2ffd5cee6465e0598837ef51283

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subtr_actor_py-0.1.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ae68bc36d9c4640fe970c8fb80fe554f42ebfab7753c811a2b393ee304742c0
MD5 a4007bf18a256e92fc3604bec9530111
BLAKE2b-256 75ff64d90c73177c8626cb2db26b5d692462477b2edd969a156dc8a5477b6c7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subtr_actor_py-0.1.14-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.14-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cfe9797ebc55b308ec0ac94d809cf307b35acbe445c94f551b8f5632fbfc10db
MD5 94b0e0065519550bcafa564ee959d4f5
BLAKE2b-256 36a032ddb979cf744adf9e06b60ae46655a6c48e997e85c1b430c55dc2e70959

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.14-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-python.yml on rlrml/subtr-actor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page