Skip to main content

MrHelix's osu! star rating calculator rewritten for your Python needs

Project description

osu_sr_calculator

Package to calculate star rating of any osu beatmap with any mod combination.

Updated on: 19.02.2021

Disclaimer

calculated star ratings may be varying slightly from original values (margin of 0.01)

Usage

from osu_sr_calculator import calculateStarRating
starRating = calculateStarRating(returnAllDifficultyValues, filepath, map_id, mods, allCombinations)

calculateStarRating method accepts these parameters:

  • returnAllDifficultyValues: returns total star rating value if False. when set to True, method will also return aim and speed difficulty
  • filepath (optional if map_id is set): Path to .osu file
  • map_id (optional if filepath is set): BeatmapID number of a beatmap
  • mods (optional): Specify which mods to include during star rating calculation
  • allCombinations (optional): when set to True, will return star rating of every possible mod combination

Examples

  • local file nomod star rating:
starRating = calculateStarRating(filepath='path/to/file.osu')
# Response: { 'nomod': x.xxxx }
  • BeatmapID DT star rating:
starRating = calculateStarRating(map_id=123456, mods=['DT'])
# Response: { 'DT': x.xxxx }
  • All possible star ratings:
starRatings = calculateStarRating(filepath='path/to/file.osu', allCombinations=True)
# Response:
# {
#     nomod: x.xxxx,
#     DT: x.xxxx,
#     HT: x.xxxx,
#     HR: x.xxxx,
#     HRDT: x.xxxx,
#     HRHT: x.xxxx,
#     EZ: x.xxxx,
#     EZDT: x.xxxx,
#     EZHT: x.xxxx,
# }
  • Aim and Speed ratings:
starRatings = calculateStarRating(filepath='path/to/file.osu', returnAllDifficultyValues=True)
# Response:
# {
#     nomod: {
#         aim: x.xxxx,
#         speed: x.xxxx,
#         total: x.xxxx,
#     }
# }

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

osu_sr_calculator-0.7.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

osu_sr_calculator-0.7.0-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file osu_sr_calculator-0.7.0.tar.gz.

File metadata

  • Download URL: osu_sr_calculator-0.7.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for osu_sr_calculator-0.7.0.tar.gz
Algorithm Hash digest
SHA256 18328144029dd6da060e224f2e782b5d35239d9217f314b6acc9fc9d01f4e712
MD5 6fa7b3d9ee95009513ad87254e8565a7
BLAKE2b-256 7ae994ca771c733ccaf0a072b8fabf8c9cd3718e240d27a602e01ec76b46d3a6

See more details on using hashes here.

File details

Details for the file osu_sr_calculator-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: osu_sr_calculator-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for osu_sr_calculator-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1036eb0299314654ee1d26c766a988d119cafb0af92347f8a455f1995d68413
MD5 40442a11fa67f3bb98a653b6b52570c8
BLAKE2b-256 d52ff9811648367dc112204e2e628645e7cae373f8b921b76a23b6bdc0c258be

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