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.2.0-cp312-cp312-win_amd64.whl (671.2 kB view details)

Uploaded CPython 3.12Windows x86-64

rox_python-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

rox_python-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (817.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: rox_python-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 671.2 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.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8370214f897bd0a2e8fd0b3e353363bf1fbac248f066f637acd8091f19bfa04a
MD5 2612ce869e3b383ea758b5218d0a1ec4
BLAKE2b-256 2b830f5118e58ae19980e7b851faedd3ab53328fa444cf29e9655c7ae79d4476

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rox_python-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 229105b9f020c0b0a2b571e3893a59a04b57089938d571371d25f3e7ca09968f
MD5 df0b3c7307ee74b56a380bda97fcd1ab
BLAKE2b-256 e748b7676eb849dc9626b4205abbdc99b153ac0143ee7af494fcc93b9c19dda6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rox_python-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b36757b1bea874310b8781e0b83342ef89118617885548efb4c72752635f2f67
MD5 7caf68c5efbf37e2d91938c83f614e7e
BLAKE2b-256 e796a93cdc63b2daa5701e71b1f37ab6fc18d7f4ede81bbd60b448c067109744

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