Skip to content
This repository was archived by the owner on Aug 18, 2024. It is now read-only.

Latest commit

 

History

History
48 lines (32 loc) · 1.48 KB

README.md

File metadata and controls

48 lines (32 loc) · 1.48 KB

hypixelaPY - Hypixel API wrapper written in Python

widget

Maintained by Myer (also known as myerfire, MyerFire)

This library is an async wrapper for the Hypixel API. It also contains some features and wrappers on relevant features of the Mojang API and session server.

Features

  • Getting a player from Hypixel from UUID, name, or an unknown source (will try to interpret as UUID first, then name)
    • Names will always be converted to a UUID using the Mojang API
  • Getting a player's name history from Mojang from UUID
  • Getting the official Hypixel leaderboards

Installation

hypixelaPY is available from the official pYpI package index.

python -m pip install -U hypixelaPY

Documentation

See docs.md

Quick Start

from hypixelaPY import Hypixel
import asyncio

API_KEY = "hahagetbaited"
# if it isn't obvious enough, replace this string 
# with your API key obtained by running /api new on Hypixel

async def main():
    hypixel = await Hypixel(API_KEY)
    player = await hypixel.player.get(name="Technoblade")
    print(f"[{player.rank.name}] {player.name}")

if __name__ == "__main__":
    asyncio.get_event_loop().run_until_complete(main())