Utils#

Utils.

asyncpixel.utils.calc_player_level(xp: Union[float, int]) float[source]#

Calculate player level from xp.

Parameters

xp (int) – amount of xp a player has.

Returns

current level of player.

Return type

float

asyncpixel.utils.get_rank(package_rank: Optional[str] = None, rank: Optional[str] = None, prefix_raw: Optional[str] = None, monthly_package_rank: Optional[str] = None, new_package_rank: Optional[str] = None) Optional[str][source]#

Get rank of Hypixel player.

Parameters
  • rank (Optional[str]) – rank

  • prefix_raw (Optional[str]) – raw prefix

  • monthly_package_rank (Optional[str]) – monthly package for mvp++

  • new_package_rank (Optional[str]) – new rank format

  • package_rank (Optional[str]) – old rank format

Returns

rank

Return type

Optional[str]