1# Import the Module
2import PyPixel
3# Importing asyncio so we can call coroutines
4import asyncio
5
6# Initialize the Hypixel class
7hypixel = PyPixel.Hypixel(api_key="API Key")
8
9async def main():
10 # Get tha player's UUID
11 uuid = await hypixel.get_uuid('awsomo28')
12 # Get the player
13 player = await hypixel.get_player(uuid)
14 # Prints the player's rank
15 print(player.rank)
16
17# run the above coroutine
18loop = asyncio.get_event_loop()
19loop.run_until_complete(main())
20