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

Uploaded CPython 3.14macOS 11.0+ ARM64

subtr_actor_py-0.1.12-cp312-cp312-win_amd64.whl (609.7 kB view details)

Uploaded CPython 3.12Windows x86-64

subtr_actor_py-0.1.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (805.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (807.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (807.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (810.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (823.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

subtr_actor_py-0.1.12-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (810.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: subtr_actor_py-0.1.12.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.12.tar.gz
Algorithm Hash digest
SHA256 afa1110fc26ae6158308ac1340777daefdde99615f2f2857e4f3cf4a8e600fc9
MD5 606f97e29a75c281975b74506dfe851f
BLAKE2b-256 ea753d4ddf15324353d4bce1448dddc9e9822d2f0ec157d8c826eb95f86973c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.12-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7e2d2243dfaed276d707c1a8ee643bd01636c2a4402fff5d6e7f2accd1a03097
MD5 1acc7cf1358709e2c469f7f5ce58b16f
BLAKE2b-256 1b2da33acd790b3521abb3a87dfbd8021d1691282041a3e96065bd2def705c28

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ced8517a43e03ccf1f40d51e41ede35867b3ae59b0da4d3ba9ee7d2ad6f74a44
MD5 2027a2775c8e7b228efab8a17ba1089f
BLAKE2b-256 a09f33173161b991eeb00e212a54875727ca488242c325d9b5f655a90ec5980e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 be210a94926166e583295de1288745ccb06e067850cd038f3967169986fe9612
MD5 d7d77854a641900392415df6b5c3b856
BLAKE2b-256 4e5e0084eba103eaa49f24d74cfffbc1b81e4d2594df33373f6a3b75425201ef

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ab9d2a0f6ad8be38be87c6089856d527178928e374d85295baf2eb004d66e51e
MD5 5ce6fcb56488cd9fa407c8a613420de0
BLAKE2b-256 cd75f78559bd2ee95ca78f68e81f5b22f34544e9fe769b8198e9ec82a8e69a23

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fb6f18b7edf93f9e813089ab336b8b490e93055b08bd0b7bfd8f8e09c069f394
MD5 009c671f07dfe7edb5253caa162aa3c1
BLAKE2b-256 a52bcadeeac25b21138abdfb175df85165b78493d328c4e7149de034d5845eab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 acc1e7eba3ae8981f89fc0015d732615ef55baa673a8f9e0cba6f2d4e86df04d
MD5 19ece17be1c907f4b61f30b7bcdb83f5
BLAKE2b-256 de468cb792ebe7bf6a8b54fc91f4b612075b8c9a64dbbef363941bd6997a1b34

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5bea8aa7b966b9e50cfc5b1f2f3ad63ce0baa3335edd179521dc49610d9d1904
MD5 06ce704a8e1cd0d5b97880823b0172a0
BLAKE2b-256 ab0a328e542bf86d16e7dd462abb8ba7f731beb573ce66b3fef3fc6eb92d60ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.12-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8c30fb5852b2b9b36a8910d7acd46e113783fae480648824c7dccc02ce470fba
MD5 d0398c1e903277b115792f5486a17853
BLAKE2b-256 5f13e62d535e2ec3aaba662e60a53f59d140569b688c02aea00f45a5925a10d0

See more details on using hashes here.

Provenance

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