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 pathdecode_bytes(data: bytes, format: str) -> Chart- Decode chart from bytesencode(chart: Chart, path: str)- Encode chart to fileencode_bytes(chart: Chart, format: str) -> bytes- Encode chart to bytesconvert(input: str, output: str)- Convert between formats
Chart Properties
title: str- Song titleartist: str- Song artistcreator: str- Chart creatordifficulty: str- Difficulty namekey_count: int- Number of keys (4, 7, etc.)note_count: int- Number of notesduration: float- Duration in secondsis_coop: bool- Whether it's a coop charthash: str- Short hash of the chart
Supported Formats
rox- ROX binary formatosu- osu!maniasm- StepManiaqua- Quaverjson/fnf- Friday Night Funkin'
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8370214f897bd0a2e8fd0b3e353363bf1fbac248f066f637acd8091f19bfa04a
|
|
| MD5 |
2612ce869e3b383ea758b5218d0a1ec4
|
|
| BLAKE2b-256 |
2b830f5118e58ae19980e7b851faedd3ab53328fa444cf29e9655c7ae79d4476
|
File details
Details for the file rox_python-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: rox_python-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
229105b9f020c0b0a2b571e3893a59a04b57089938d571371d25f3e7ca09968f
|
|
| MD5 |
df0b3c7307ee74b56a380bda97fcd1ab
|
|
| BLAKE2b-256 |
e748b7676eb849dc9626b4205abbdc99b153ac0143ee7af494fcc93b9c19dda6
|
File details
Details for the file rox_python-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: rox_python-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 817.4 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b36757b1bea874310b8781e0b83342ef89118617885548efb4c72752635f2f67
|
|
| MD5 |
7caf68c5efbf37e2d91938c83f614e7e
|
|
| BLAKE2b-256 |
e796a93cdc63b2daa5701e71b1f37ab6fc18d7f4ede81bbd60b448c067109744
|