Skip to main content

Python bindings for Rhythm Open Exchange

Project description

ROX Python Bindings

Python bindings for Rhythm Open Exchange using PyO3.

Installation

From source (development)

# Install maturin
pip install maturin

# Build and install in development mode
cd bindings/python
maturin develop

Build wheel

maturin build --release
pip install target/wheels/rox-*.whl

Usage

import rox

# Decode a chart file
chart = rox.decode("song.osu")
print(f"{chart.artist} - {chart.title}")
print(f"Keys: {chart.key_count}K")
print(f"Notes: {chart.note_count}")
print(f"Duration: {chart.duration:.1f}s")

# Encode to a different format
rox.encode(chart, "output.qua")

# Convert directly
rox.convert("input.osu", "output.sm")

# Decode from bytes
with open("chart.osu", "rb") as f:
    data = f.read()
chart = rox.decode_bytes(data, "osu")

# Encode to bytes
osu_bytes = rox.encode_bytes(chart, "osu")

API Reference

Functions

  • decode(path: str) -> Chart - Decode chart from file path
  • decode_bytes(data: bytes, format: str) -> Chart - Decode chart from bytes
  • encode(chart: Chart, path: str) - Encode chart to file
  • encode_bytes(chart: Chart, format: str) -> bytes - Encode chart to bytes
  • convert(input: str, output: str) - Convert between formats

Chart Properties

  • title: str - Song title
  • artist: str - Song artist
  • creator: str - Chart creator
  • difficulty: str - Difficulty name
  • key_count: int - Number of keys (4, 7, etc.)
  • note_count: int - Number of notes
  • duration: float - Duration in seconds
  • is_coop: bool - Whether it's a coop chart
  • hash: str - Short hash of the chart

Supported Formats

  • rox - ROX binary format
  • osu - osu!mania
  • sm - StepMania
  • qua - Quaver
  • json / fnf - Friday Night Funkin'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

rox_python-0.1.0-cp312-cp312-win_amd64.whl (670.4 kB view details)

Uploaded CPython 3.12Windows x86-64

rox_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

rox_python-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (809.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file rox_python-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rox_python-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 670.4 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rox_python-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dcc571d7ac9a1288d65d3b432a7aa137cd86dc62517f4efc50a59bbf9660cdc5
MD5 a13190fbe7f4003ae3e111c905d653ab
BLAKE2b-256 7598be9c130b3abd41d90b335151e5aa0464e9e2137eaeb93bd7c34962ded85d

See more details on using hashes here.

File details

Details for the file rox_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rox_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 07126ab386d5be2f4f409a18064fc01a86ea76192954a2a051400307ce2d5afe
MD5 94d37c9130648efcf4076df4fe8e3987
BLAKE2b-256 061d1e77c0158b3c3ac070185fab4fa5f6b7fb0c328d44cb7813618c04cb7b60

See more details on using hashes here.

File details

Details for the file rox_python-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rox_python-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7ee795492fb3195bea5b66aa596f077f2e8241f905d10901578b9ca00e9b4ad7
MD5 d06d128fe700a9cfa0dc74130118f9f1
BLAKE2b-256 c5cd1b7a2fef8d5c794d297c8b269b34e28d4d95bc925f0676f1a31edbfbe49f

See more details on using hashes here.

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