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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

subtr_actor_py-0.1.13-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.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (807.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (807.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (810.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

subtr_actor_py-0.1.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (822.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

subtr_actor_py-0.1.13-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (810.8 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: subtr_actor_py-0.1.13.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.13.tar.gz
Algorithm Hash digest
SHA256 6801bd14d9ccf3925c41a289272dc36e2e7f2ff91ebc62dd6c39879fd91d1037
MD5 7bec1ad99657613372b2f42784f18989
BLAKE2b-256 5d5e8edaa4ae367a8956a57214fc5e01080a39ed3b075f7670b0b48321b290d0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.13-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6dd9823154efc46314a22aa75d7938a041ef353d442156950ba0f18857277f29
MD5 5bac87218eb7907145c55ad7e9b8129d
BLAKE2b-256 3b8e637dfa47a0fbe93edf15afb8851a49fca3e274255123f183d3c17891a3ea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.13-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e204162540e69dc725163af1a9ab3263dfc22b51a278781c579662e14571e1c7
MD5 a0d2846f9f3faf61e6913c37ad764d98
BLAKE2b-256 dce3e92f4ccd2414ce0602bbbda4d8e850cf283e6123334e24aac360ea3f31a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.13-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 07d5fb54c59465badbb30501814fc5c39e31c168ef97e9ea518f80352b810ef7
MD5 e74054aba29e466a7d3bb51c4ca82926
BLAKE2b-256 c7f2514221211741f56dec231004f3230810cb2a70e6512bb2f507bb5cf87d7a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c3033c1bc164475086efa0b1029a2ea8df9726c0f7af392ca5760267eb7b7b3a
MD5 e7bb8b6f2b7397deb75012a315b51ebd
BLAKE2b-256 2b6ca1c8b175c355a09ed02dffc110288c7c434b41b459bfb72955093a288729

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 112356e979b7191357c3ceeeafb8fb82991eca24a272fc99600d90e584912dc8
MD5 f139cc4e5198a49885f16c4d1b561d0f
BLAKE2b-256 8533a46f156c676d6e0eee42aa64e324691da49b992ad76f0f19b887e738d4aa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7ddab5b56bbfefcd2967a0a1f4d87450e315229556345ad5060e62020e88376a
MD5 8d56acf502031e4790433cc314e360de
BLAKE2b-256 44e1b495cdc6fbd7cf86f0f976fa9a80060a2998777af781d3486e3dd9ec9ac3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae89f574c3bcbbd50f7e7d4a931aba448bca5e92b222f4607c2b785f1194a238
MD5 3e264989eab639215ed997295461c86f
BLAKE2b-256 de2f3a42c679cd5b68e6662204eab6968b356effb33097111dac699f53c7d161

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subtr_actor_py-0.1.13-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3fbfa6089d6599964474dec9f1e894b6d922e5721eebdc65be611cd4bb36e663
MD5 0a0bf185d520de077b4ac0c5e5afff24
BLAKE2b-256 3821d32d43214469c7c4f8026817b657f70f9da0a3b568a94c1f6cb03e424b97

See more details on using hashes here.

Provenance

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