Socket
Socket
Sign inDemoInstall

osu-sr-calculator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

osu-sr-calculator

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


Maintainers
1

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,
#     }
# }

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc