osu-native-py
Python wrapper for osu-native, providing difficulty and performance calculation for all osu! modes.
Example
Calculating performance
from osu_native_py.wrapper.calculators import create_difficulty_calculator
from osu_native_py.wrapper.calculators import create_performance_calculator
from osu_native_py.wrapper.objects import Beatmap
from osu_native_py.wrapper.objects import Mod
from osu_native_py.wrapper.objects import ModsCollection
from osu_native_py.wrapper.objects import Ruleset
from osu_native_py.wrapper.objects import ScoreInfo
BEATMAP_PATH = "/path/to/file.osu"
beatmap = Beatmap.from_file(BEATMAP_PATH)
ruleset = Ruleset.from_id(0)
mods = ModsCollection.create()
for mod_name in ["DT", "CL"]:
mod = Mod.create(mod_name)
mods.add(mod)
score = ScoreInfo(
accuracy=0.94,
max_combo=116,
count_great=65,
count_meh=0,
count_ok=6,
count_miss=0,
)
diff_calc = create_difficulty_calculator(ruleset, beatmap)
diff_attrs = diff_calc.calculate(mods)
perf_calc = create_performance_calculator(ruleset)
perf_attrs = perf_calc.calculate(ruleset, beatmap, mods, score, diff_attrs)
print(perf_attrs.total)
Installation
pip install osu-native-py
Supported Platforms
- Windows: x64
- Linux: x64, ARM64, ARM
- macOS: ARM64 (Apple Silicon)
Thanks to
- minisbett for maintaining osu-native.
- Lekuruu for helping me with Python-related questions and some cleanup of the code.
Metadata
Release files for osu-native-py 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| osu_native_py-0.1.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for osu_native_py-0.1.1-py3-none-win_amd64.whl |
| osu_native_py-0.1.1-py3-none-manylinux_2_38_x86_64.whl | Python 3 | none | Linux glibc 2.38+ x86-64 | Details for osu_native_py-0.1.1-py3-none-manylinux_2_38_x86_64.whl |
| osu_native_py-0.1.1-py3-none-manylinux_2_38_armv7l.whl | Python 3 | none | Linux glibc 2.38+ ARMv7l | Details for osu_native_py-0.1.1-py3-none-manylinux_2_38_armv7l.whl |
| osu_native_py-0.1.1-py3-none-manylinux_2_38_aarch64.whl | Python 3 | none | Linux glibc 2.38+ ARM64 | Details for osu_native_py-0.1.1-py3-none-manylinux_2_38_aarch64.whl |
| osu_native_py-0.1.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for osu_native_py-0.1.1-py3-none-macosx_11_0_arm64.whl |
Total release size: 48.0 MB
Release files / osu_native_py-0.1.1-py3-none-win_amd64.whl
| Download URL | osu_native_py-0.1.1-py3-none-win_amd64.whl |
|---|---|
| Size | 7.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
063494fea9f9c6634c46ef87a6712a03688e41c6540230e344229d22462e6870
|
|
BLAKE2b-256 checksum How to use checksums |
686149e2eb428a4e00a43c0c2dc42f6a59abc1a4a2d47992b52cf2215118b2f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / osu_native_py-0.1.1-py3-none-manylinux_2_38_x86_64.whl
| Download URL | osu_native_py-0.1.1-py3-none-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 7.9 MB |
| Tags | Linux glibc 2.38+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
bb986ad2b758a61f56aea561e0161008db7ee374eba53fde2b584bed1241be5f
|
|
BLAKE2b-256 checksum How to use checksums |
e3b752e0b9070c450076b114c0153ff79bdd7ac41be4da5eadf8a7d43eb6be45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / osu_native_py-0.1.1-py3-none-manylinux_2_38_armv7l.whl
| Download URL | osu_native_py-0.1.1-py3-none-manylinux_2_38_armv7l.whl |
|---|---|
| Size | 17.6 MB |
| Tags | Linux glibc 2.38+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
2994b86cc6630bbde4947f9e808fd97aac7e52da01692326013ca9d701f3c5f4
|
|
BLAKE2b-256 checksum How to use checksums |
547aa82b3e9c8fd72170d8c7fab878571501b6fdfc6bdf7b24fdd73be3c562b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / osu_native_py-0.1.1-py3-none-manylinux_2_38_aarch64.whl
| Download URL | osu_native_py-0.1.1-py3-none-manylinux_2_38_aarch64.whl |
|---|---|
| Size | 7.6 MB |
| Tags | Linux glibc 2.38+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
b4d12244653dd59add6ce245f2097862f63de1b01743e2bb2b2f542b5d19802b
|
|
BLAKE2b-256 checksum How to use checksums |
0aed8b1fc03d5398e1b2e239ff87a982e73d6cf43ade2e7f124cd0877b2cf593
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / osu_native_py-0.1.1-py3-none-macosx_11_0_arm64.whl
| Download URL | osu_native_py-0.1.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 7.4 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
711caca7c942674e8d4a6ad0526e0358e47f3aba51322e310793122931414e7f
|
|
BLAKE2b-256 checksum How to use checksums |
d6c44ba84a4605db5517e83f49bb93f6fc5387142e12de93099365d91613c563
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for osu-native-py 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.