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

PlayerBoost is exposed in raw replay units (0-255), not 0-100 percent.

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.17.tar.gz (11.1 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.17-cp314-cp314-macosx_11_0_arm64.whl (738.2 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

subtr_actor_py-0.1.17-cp312-cp312-win_amd64.whl (613.5 kB view details)

Uploaded CPython 3.12Windows x86-64

subtr_actor_py-0.1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (807.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (811.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (811.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.17-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (813.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (822.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

subtr_actor_py-0.1.17-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (813.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: subtr_actor_py-0.1.17.tar.gz
  • Upload date:
  • Size: 11.1 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.17.tar.gz
Algorithm Hash digest
SHA256 3f3fa53d2a2735fb632de56c7ecc4ae8d784efb28cfdc48807998cd431b4f80c
MD5 e7e69481ccdabe93b34cbf0b1f453555
BLAKE2b-256 6348cc289c89ac8aabee5e29161af28c6faa74ea57f0ec2c9205c663d90297a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17.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.17-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.17-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af8ca0e40022acb44d009b92a528faf4b729843f9b4296e4c757e7f8b3ef9853
MD5 1644b8dadcccafc3427e3f13527d628a
BLAKE2b-256 b6c2171e410700ce2016612cda7176502c7aa350ebf78338d8cce242ff34582d

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17-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.17-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f35ad14783f833d6d9087811d0f9a67f1e2a6c58c1cf788b017f5686f9a84622
MD5 d0a14b6c2ca97df619411e3afabc75ad
BLAKE2b-256 552d4b6553452fdc78cfd24cf5ee50ae024a32b7d51cb5d7dbdcdf9b37358fc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17-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.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f3902cb2d531577c4477b0236ca679c95aca24733c3f1683302559fb31a7540d
MD5 60f78f1d8ae375c31be5a3025066a368
BLAKE2b-256 36851c43d52232e8e68de4e946c078fa71b46acd7dc05fe6567b05a246bee682

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17-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.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3461d5088cf5739bf1b69fe9276531c5eba8a730599e7fde8575ec1b3849c34e
MD5 e100c3297cd76b3205b6246280b36ef9
BLAKE2b-256 eccd0581fe07a036b538dd0f7156bd75e883edd51fb83bb35068f370c251d0df

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17-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.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 15a68a49f304326d65c35ccfc20a680312b28985146fadfeb61cc748efd50b28
MD5 203b4a9238523304fafbe58b41f7e1f4
BLAKE2b-256 9d2194104901030de5388a8572014dfc7d48aa78d20dde44472a83e20bbdc6ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17-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.17-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.17-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 60ec2a56b56fb96986a782070d7398620985b73cca0b77b37305d4de2dd59611
MD5 9b470df8c3d88d225b3b224979443acb
BLAKE2b-256 e282cc00a629b0b5e256ff1bf92d573235c996060b8edfd6b3e421cad78f2b87

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17-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.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ab566af571d0a71e74a4ad97c9f345c9cfd00016ab7e40f31514b9e34cb1a38
MD5 acd3afd621118b2f09ea06cf1a4ee011
BLAKE2b-256 d2788374e08b75a959bae30a2d0b72f4a9e1a65ddc87d54d11e7244ea84674af

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17-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.17-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subtr_actor_py-0.1.17-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 30358a35c32d8177d0c0dbadc3229e51ff17724f18412a950718c1fc4619ee94
MD5 b355e05e725743db60615f5c7cff2bca
BLAKE2b-256 2f417dcb6863322b6bfab1166dab6e280dd3e4070565e4b5ae412f952b75652a

See more details on using hashes here.

Provenance

The following attestation bundles were made for subtr_actor_py-0.1.17-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