I SUGGEST YOU TAKE A LOOK AT MY OTHER PROJECT aiosu WHICH NOW HAS ALL MODE PP CALCULATION
Written with ❤️ by Nice Aesthetics. Based on ompp-web
pip install maniera
Maniera is supposed to work on Python 3+ versions
from maniera.calculator import Maniera
# 64 = DT (https://github.com/ppy/osu-api/wiki#mods)
# Maniera(path, modnum, score)
calc = Maniera('beatmap.osu', 64, 800000)
calc.calculate()
print(f"{round(calc.pp, 2)} PP - {round(calc.sr, 2)} Stars")
Output:
564.36 PP - 8.16 Stars