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.15.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.15-cp314-cp314-macosx_11_0_arm64.whl (737.7 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

subtr_actor_py-0.1.15-cp312-cp312-win_amd64.whl (611.1 kB view details)

Uploaded CPython 3.12Windows x86-64

subtr_actor_py-0.1.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (805.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (809.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (809.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (811.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (822.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

subtr_actor_py-0.1.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (812.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: subtr_actor_py-0.1.15.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.15.tar.gz
Algorithm Hash digest
SHA256 79fd64b3060b05304d39ec1179f898e502b7fe00f741d74679b27e19119dc3fa
MD5 5eacb6aebc58a4f87a30cdf3147c8aad
BLAKE2b-256 23df3baff57b05f0af4c51528cb32ff44b990dac3ce7049b640840d1adb417bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.15-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed7d24484b2d6e01066b54accb82ac5d2d420f25226a1e50cf4f4c038876100c
MD5 4d20289e089c59b0b1414cabd8df7907
BLAKE2b-256 1f81cecfb609cd53047a227da53d6ddd591df29138aa9ef1d1fdb6b372a8e945

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 adc7b64ba66762872866d1bf82728bc415299d4075c9b266a02cf95e7908a138
MD5 6d80444335acf1947f292d7d9db9b87a
BLAKE2b-256 ee50079af285d061d0320369cf66941d71d5886322c022333997cf3d494bd5b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bf07a1a478ccf6f26e9ae0d8b5566d51c7ffa0e4903549163e4fe0319c2a8b69
MD5 24d49585ce90a75bc022da56162b3435
BLAKE2b-256 8ca216d0a6301bad2f5586f315ed8c24d9d289cfe86950afd81b728e75c10c20

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 56b26d39ac0b70f2709ee567477ed92eb0913ae5f8907cecfbd3b32039a5f358
MD5 cc1d31f42b4fd5d60e2adc6054de328b
BLAKE2b-256 e694a84bb1b07f9b38cd31b1596b260b6248f30fe79111098ae7d5f73f96d589

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 21196bf3b286ab96a925b7f694de5c0baef5f5b7bf1194f4b2f9d6e19fe37a5c
MD5 960f213b9ee74b991f604ef4bd9558f4
BLAKE2b-256 767406489b6644e5f264792b86b0abda2dcbc454ce0c32cf34e5768995ec6ef9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c2f4c4517e45e66ea61359040e751f222466f2d41f13e65d19f749988d43c42e
MD5 004656534a9756154eac8a0a642c4c07
BLAKE2b-256 bd6d94c7186a1f01bd3eb7b17b6ce2c9254a3e2c7970ab7cec74d293dcfe27e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15a420827d224368fe19ad9a409999c29a41f56fd2e4c1912db206b217c168b7
MD5 ba35a34096f499683e02996e3a6a2e26
BLAKE2b-256 c4e629bd2bb78bbdca7108904ae6ef7bdd51ac42a669c6a005e6514a0c7400d0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b9871a6ac44210e873fba65f8527ee52e7025e9de6e659ef5a196802b5702bb4
MD5 2d0bc6f128e74a3d1898058d22bac5ec
BLAKE2b-256 7d21589d34fbc654c24b1b961afbe2db1bc74b05bc381dcc86dd67665054f518

See more details on using hashes here.

Provenance

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