hypy package

Subpackages

Submodules

hypy.hypixel module

class hypy.hypixel.Hypixel

Bases: object

The main object used to interact with the Hypixel API

Before interacting with the api you need to call Hypixel.setup()

__init__(key, *, session=None, debug=False, retry=False, max_retries=5, loop=None, skyhelper_credentials=None)
session: aiohttp.client.ClientSession
skyhelper: Optional[hypy.ext.skyhelper.skyhelper.SkyHelperWrapper] = None
async close()

Close internal session

Return type

None

async setup()

Properly set up Hypixel object

Return type

None

async get_player(nameOrUuid)

Returns a Player object for a given name or UUID

Parameters

nameOrUuid (str) – The name or uuid of the player

Return type

Player

async get_player_status(nameOrUuid)

Returns status of player

Parameters

nameOrUuid (str) – The name or uuid of the player

Return type

PlayerStatus

async get_guild(name=None, guild_id=None, playerNameOrUuid=None)

Gets a guild based on one of three parameters

Parameters
  • name (Optional[str]) – The name of a guild

  • guild_id (Optional[str]) – The id of a guild

  • playerNameOrUuid (Optional[str]) – The name or uuid of a guild member

Return type

Optional[Guild]

async get_key_stats()

Gets statistics of API Key

Return type

KeyStats

async get_watchdog_stats()

Gets punishment statistics

Return type

WatchdogStats

async get_profile(profile_id, uuid)

Gets a Hypixel SkyBlock Profile

For general usage, going through hypy.player.Player.find_profile() is better

Parameters
  • profile_id (str) – The id of the profile

  • uuid (str) – The uuid of the player

Return type

SkyblockProfile

async get_friends(nameOrUuid)

Gets Friends of given name or UUID

Args:

nameOrUuid: The name or uuid of the player

Return type

HypixelFriends

async get_auctions()

Gets Hypixel SkyBlock auctions

Return type

SkyblockAuctions

async get_bazaar()

Gets bazaar information

Return type

Bazaar

async get_player_counts()

Get Hypixel Player counts

Return type

PlayerCounts

async update_resources()

Update Hypixel Resources

Return type

SkyBlockResources

hypy.player module

class hypy.player.Player

Bases: hypy.hypyobject.HypyObject, hypy.hypixelplayer.HypixelPlayer

A Hypixel Player

displayname: str

The display name of the player

property first_login: datetime.datetime

The first login of the Player

Return type

datetime

property last_login: datetime.datetime

The last login of the Player

Return type

datetime

property last_logout: datetime.datetime

The last logout of the Player

Return type

datetime

property social_media: hypy.socialmedia.SocialMedia

The players social media information

Return type

SocialMedia

property achievement_skills: dict

SkyBlock skill data from achievements

Return type

dict

property skyblock_profiles: List[dict]

SkyBlock Profiles of the Player

Return type

List[dict]

async get_profile(*, name=None, profile_id=None)

Gets a Hypixel SkyBlock Profile from name OR profile id

Parameters
  • name – The cute name (eg. Strawberry) of a profile

  • profile_id – The profile_id of a profile

Return type

SkyblockProfile

async find_profile(*, key)

Find Hypixel SkyBlock Profile by a metric

Parameters

key (Callable) – The key to find the profile by, most likely a lambda (eg. find_profile(key=lambda p: p.skills.avg))

Return type

Tuple[SkyblockProfile, Optional[str]]

hypy.profile module

class hypy.profile.SkyblockProfile

Bases: hypy.hypyobject.HypyObject

A Hypixel SkyBlock Profile

profile_id: str

The profile id of the profile

deleted: bool

Whether the profile has been deleted

async refetch()

Refresh the profile

Return type

None

async save_json(filename)

Save raw member info to the disk

Parameters

filename – The name of the file to save to

Return type

None

async networth()

Gets the networth of a profile from the Hypixel classes SkyHelper API instance, if one exists.

Return type

Dict

property senither_weight: dict

Returns weight in the Senither weight system

Return type

dict

property skills: hypy.skyblockskills.SkyblockSkills

Skill levels

Return type

SkyblockSkills

property xp: hypy.skyblockskills.SkyblockSkills

Skill xp

Return type

SkyblockSkills

property sea_creature_kills: int

Sea creature kills of profile

Return type

int

property slayer: hypy.skyblockskills.SkyblockSlayers

Slayers

Return type

SkyblockSlayers

property inventory: hypy.skyblockinventories.SkyblockInventory

Inventory data

Return type

SkyblockInventory

property backpacks: hypy.skyblockinventories.SkyblockBackpacks

Skyblock Backpacks

Return type

SkyblockBackpacks

property quiver: hypy.skyblockinventories.SkyblockInventory

Skyblock Quiver

Return type

SkyblockInventory

property ender_chest: hypy.skyblockinventories.SkyblockInventory

Skyblock Enderchest

Return type

SkyblockInventory

property personal_vault: hypy.skyblockinventories.SkyblockInventory

Skyblock Personal Vault

Return type

SkyblockInventory

property candy_bag: hypy.skyblockinventories.SkyblockInventory

Skyblock Candy Bag

Return type

SkyblockInventory

property talisman_bag: hypy.skyblockinventories.SkyblockInventory

Skyblock Talisman Bag

Return type

SkyblockInventory

property fishing_bag: hypy.skyblockinventories.SkyblockInventory

Skyblock Fishing Bag

Return type

SkyblockInventory

property potion_bag: hypy.skyblockinventories.SkyblockInventory

Skyblock Potion Bag

Return type

SkyblockInventory

property armor: hypy.skyblockinventories.SkyblockInventory

Armor data

Return type

SkyblockInventory

property kills: collections.defaultdict

Dictionary of mob kills

Return type

defaultdict

property deaths: collections.defaultdict

Dictionary of deaths

Return type

defaultdict

property purse: int

Amount of coins in purse

Return type

int

property bank: hypy.skyblockskills.SkyblockBank

Coins in bank

Return type

SkyblockBank

hypy.playercounts module

class hypy.playercounts.PlayerCounts

Bases: hypy.hypyobject.HypyObject

Hypixel Player counts

Get the counts of a game with playercounts.GAME_NAME

hypy.playerstatus module

class hypy.playerstatus.PlayerStatus

Bases: hypy.hypyobject.HypyObject

Status of a player

online: bool

Whether the player is currently online

game: Optional[str]

The game the player is currently playing

mode: Optional[str]

The mode of the game the player is currently playing

map: Optional[str]

The map the player is currently playing on

hypy.hypixelfriends module

class hypy.hypixelfriends.HypixelFriends

Bases: hypy.hypyobject.HypyObject, hypy.abc.HypyIterable

Hypixel Friends of a Player

friends: List[hypy.hypixelfriend.HypixelFriend]

A list of HypixelFriends

iter_uuids()

Iterate over uuids of Iterable

Return type

Iterator[UUID]

async names()

Return names of all of the friends

Return type

List[str]

hypy.hypixelfriend module

class hypy.hypixelfriend.HypixelFriend

Bases: hypy.hypyobject.HypyObject, hypy.hypixelplayer.HypixelPlayer

A Hypixel Friend

property since: datetime.datetime

Since when the friendship exists

Return type

datetime

hypy.guild module

class hypy.guild.Guild

Bases: hypy.hypyobject.HypyObject, hypy.abc.HypyIterable

A Hypixel Guild

name: str

The name of the guild

members: List[hypy.guildmember.GuildMember]

A list of GuildMembers

iter_uuids()

Iterate over uuids of Iterable

Return type

Iterator[UUID]

property uuid_list: List[str]

List of UUIDs of players in guild

Return type

List[str]

async name_list()

Get list of names of players in guild

Return type

List[str]

async player_list()

Get list of hypy.Player objects for players in guild

Return type

List[Player]

when_joined(uuid)

Check when a player joined the guild

Parameters

uuid – The uuid of the player

Return type

dict

rank_of(uuid)

Check rank of a player

Parameters

uuid – The uuid of the player

Return type

GuildRank

property ranks: List[hypy.guildrank.GuildRank]

The ranks of the guild

Return type

List[GuildRank]

hypy.guildmember module

class hypy.guildmember.GuildMember

Bases: hypy.hypixelplayer.HypixelPlayer, hypy.hypyobject.HypyObject

A Hypixel Guild Member

rank: GuildRank

The GuildRank of this GuildMember

property joined: datetime.datetime

The datetime when the player joined the guild

Return type

datetime

hypy.guildrank module

class hypy.guildrank.GuildRank

Bases: hypy.hypyobject.HypyObject

A Hypixel guild rank

name: str

The name of the rank

default: bool

Whether the rank is the default rank for the guild

tag: str

The tag of the rank

priority: int

The priority of the rank

index: int

The position of the rank

property created: datetime.datetime

When the rank was created

Return type

datetime

hypy.auctions module

class hypy.auctions.FilterType

Bases: enum.Enum

Types to filter Auctions by

NAME = 1
AUCTIONEER = 2
LORE = 3
class hypy.auctions.SkyblockAuctions

Bases: hypy.hypyobject.HypyObject

SkyBlock Auction data

async find_auctions(by='name', query='', case_sensitive=True)

Find Auctions

Parameters
  • by (Union[str, FilterType]) – What to filter by

  • query (str) – The query

  • case_sensitive (bool) – Whether searching should be case sensitive

Return type

List[Auction]

hypy.auction module

class hypy.auction.Auction

Bases: hypy.hypyobject.HypyObject

A Hypixel SkyBlock Auction

profile_id: str

The profile id of the auctioneer

item_name: str

The name of the item

item_lore: str

The lore of the item If you want cleaned lore (without colorcodes) use safe_item_lore instead

safe_item_lore: str

The lore without any formatting

item_category: str

The auction house category of the item

tier: str

The rarity of the item

starting_bid: str

The starting bid of the item

bin: bool

Whether the auction is BIN (Buy it now) or not

highest_bid: int

The highest bid of the auction

auctioneer_uuid: UUID

The UUID of the auctioneer

static init(data, lore, hypy)

Initialize an Auction object

Return type

Auction

property nbt_item: hypy.skyblockinventories.SkyblockItemSlot

A SkyblockItemSlot for this auction

Return type

SkyblockItemSlot

property start: datetime.datetime

The start of the auction

Return type

datetime

property end: datetime.datetime

The end of the auction

Return type

datetime

async get_auctioneer_name()

Get name of Auctioneer

Returns:

The name of the auctioneer

Raises:

UUIDNotFound: The uuid to find the name was invalid

Return type

str

hypy.bazaar module

class hypy.bazaar.Bazaar

Bases: hypy.hypyobject.HypyObject

A class containing information about the Hypixel Skyblock bazaar

Items can be accessed with Bazaar[‘ITEM_NAME’]

property timestamp: datetime.datetime

The time when Bazaar information was fetched

Return type

datetime

hypy.bazaaritem module

class hypy.bazaaritem.BazaarOrder

Bases: hypy.hypyobject.HypyObject

An order on the SkyBlock Bazaar

type: str

Whether the order is a BUY or SELL order

price_per_unit: int

The price per item

amount: int

The amount of items ordered

class hypy.bazaaritem.BazaarItem

Bases: hypy.hypyobject.HypyObject

An item on the SkyBlock Bazaar

sell_orders: List[hypy.bazaaritem.BazaarOrder]

A list of sell orders for the item

product_id: str

The items id

buy_orders: List[hypy.bazaaritem.BazaarOrder]

A list of buy orders for the item

hypy.hypixelplayer module

class hypy.hypixelplayer.HypixelPlayer

Bases: hypy.abc.MinecraftPlayer

Class for HypixelPlayer-likes to inherit from

async friends()

Gets HypixelFriends of the HypixelPlayer

Return type

HypixelFriends

async status()

Gets PlayerStatus of the HypixelPlayer

Return type

PlayerStatus

async guild()

Gets the Guild of the HypixelPlayer

Return type

Optional[Guild]

async player()

Gets the Player of the HypixelPlayer

Return type

Player

async name()

Gets the Name of the HypixelPlayer from the Mojang API

Return type

str

hypy.hypyobject module

class hypy.hypyobject.HypyObject

Bases: object

A base object for API Data

async save_json(filename)

Save raw API data to disk

Parameters

filename – The name of the file to save to

Return type

None

hypy.models module

class hypy.models.KeyStats

Bases: object

API Key Statistics

owner: str

The owner of the api key

owner_name: str

The name of the owner of the api key

total_uses: int

The total uses of the api key

queries_in_past_minute: int

The amount of queries of the api key in the past minute

timestamp: int

The timestamp of this information

class hypy.models.WatchdogStats

Bases: object

Punishment statistics

watchdog_last_minute: int

The amount of bans made by watchdog in the last minute

staff_rolling_daily: int

The amount of bans made by staff in the past day

watchdog_total: int

The total amount of bans made by watchdog

watchdog_rolling_daily: int

The amount of bans made by watchdog in the past day

staff_total: int

The total amount of bans made by watchdog

hypy.skyblockinventories module

class hypy.skyblockinventories.SkyblockItemSlot

Bases: object

A Skyblock Item Slot

empty: bool = False

Whether the slot is empty

minecraft_item_id: int = 0

The minecraft item id of the item

count: int = 0

How many items there are

name: str = ''

The name of the item

lore: str = ''

The lore of the item

skyblock_item_id: str = ''

The skyblock item id of the item

reforge: str = ''

The reforge of the item

recombobulated: bool = False

Whether the items rarity has been upgraded

enchantments: Dict[str, int] = {}

A dictionary of enchantments (name:level)

origin: str = ''

How the item was obtained

class hypy.skyblockinventories.SkyblockInventory

Bases: object

A Skyblock Inventory

type: str

The type of the inventory

slots: List[hypy.skyblockinventories.SkyblockItemSlot]

The list of items in the inventory

class hypy.skyblockinventories.SkyblockBackpack

Bases: hypy.skyblockinventories.SkyblockInventory

A Skyblock Backpack

type: str

The type of the inventory

slots: List[hypy.skyblockinventories.SkyblockItemSlot]

The list of items in the inventory

class hypy.skyblockinventories.SkyblockBackpacks

Bases: object

A list of SkyBlock backpacks

backpacks: List[hypy.skyblockinventories.SkyblockBackpack]

A list of SkyblockBackpacks

hypy.skyblockskills module

class hypy.skyblockskills.SkyblockSkills

Bases: hypy.hypyobject.HypyObject

A class representing skyblock skills

The level of a skill can be retrieved like this: skyblockskills.fishing

property raw: dict

Get skills in a dictionary style

Return type

dict

fishing
alchemy
taming
enchanting
combat
mining
farming
foraging
catacombs
healer
berserk
archer
mage
tank
class hypy.skyblockskills.SkyblockSlayers

Bases: hypy.hypyobject.HypyObject

A class representing Skyblock Slayers of a profile

The xp of a slayer can be retrieved like this: skyblockskills.enderman

property raw: dict

Get slayers in a dictionary style

Return type

dict

class hypy.skyblockskills.SkyblockBank

Bases: hypy.hypyobject.HypyObject

A class representing the skyblock bank of a profile

property raw: dict

A dict style representation of SkyblockBank

Return type

dict

property balance: Optional[int]

Balance in bank

Return type

Optional[int]

hypy.socialmedia module

class hypy.socialmedia.SocialMedia

Bases: object

Hypixel Social Media response wrapper

property youtube: Optional[str]

The linked youtube channel

Return type

Optional[str]

property discord: Optional[str]

The linked discord tag

Return type

Optional[str]

property hypixel: Optional[str]

The linked hypixel forums account

Return type

Optional[str]

property mixer: Optional[str]

The linked mixer account

Return type

Optional[str]

property twitch: Optional[str]

The linked twitch account

Return type

Optional[str]

property twitter: Optional[str]

The linked twitter account

Return type

Optional[str]

property instagram: Optional[str]

The linked instagram account

Return type

Optional[str]

hypy.mojang module

class hypy.mojang.NameHistoryEntry

Bases: object

An Entry in a players name history

uuid: str = ''
changed_to_at: Optional[datetime.datetime] = None
name: str = ''
class hypy.mojang.Mojang

Bases: object

A simple wrapper for Mojangs API

If you are using this with hypy, the Hypixel class already has an instance of this class ready, you do not need to instantiate it yourself

session: aiohttp.client.ClientSession
async close()

Close internal aiohttp session

Return type

None

async name_to_uuid(name)

Returns UUID for given name

Parameters

name – The name of the player

Return type

str

async uuid_to_name(uuid)

Returns name for given UUID

Parameters

uuid – The uuid of the player

Return type

str

hypy.utils module

hypy.utils.resolve_dict_path(dictionary, path)
hypy.utils.get_auction_lores(auctions)

return lore for each auction, use asyncio.to_thread for this

hypy.utils.get_safe_content(content)

get safe content

Return type

str

hypy.utils.is_uuid(uuid)

Check if parameter is a UUID

Return type

bool

hypy.utils.is_username(username)

Check if parameter is a username

Return type

bool

hypy.utils.lvlCalc(xp, skilltype)

calculate level for any given skill

Return type

float

hypy.utils.item_id_to_name(item_id)

Return name for given item id

Return type

Tuple[str, str]

hypy.utils.decode_nbt(raw_data)

Decode NBT data

hypy.utils.unpack_nbt(tag)

Unpack an NBT tag into a native Python data structure.

class hypy.utils.Utils

Bases: object

Some misc functions used in hypy

lvlCalc(xp, skilltype)

calculate level for any given skill using cumulative xp from the api

Return type

float

hypy.utils.parse_timestamp(to_parse)

Return datetime for given timestamp

Return type

datetime

hypy.uuid module

class hypy.uuid.UUID

Bases: object

Helper Class for uuid

property dashes: str

The UUID with dashes

Return type

str

property no_dashes: str

The UUID without dashes

Return type

str

hypy.exceptions module

exception hypy.exceptions.HypyException

Bases: Exception

A Hypy Exception

exception hypy.exceptions.InvalidHTTPCode

Bases: hypy.exceptions.HypyException

Exception to raise when an HTTP code is not what it was expected to be

exception hypy.exceptions.UsernameNotFound

Bases: hypy.exceptions.HypyException

Exception to raise when a minecraft user was not found

exception hypy.exceptions.UUIDNotFound

Bases: hypy.exceptions.HypyException

Exception to raise when a minecraft user was not found

exception hypy.exceptions.InvalidAccountDescriptor

Bases: hypy.exceptions.HypyException

Exception to raise when an invalid account descriptor was passed

exception hypy.exceptions.HypixelNoSuccess

Bases: hypy.exceptions.HypyException

Exception to raise when Hypixel returns success=false

exception hypy.exceptions.NotEnoughArguments

Bases: hypy.exceptions.HypyException

Exception to raise when not enough arguments were passed in

exception hypy.exceptions.ApiOffException

Bases: hypy.exceptions.HypyException

Exception to raise when a disabled API gets queried

exception hypy.exceptions.MalformedIDException

Bases: hypy.exceptions.HypyException

Exception to raise when a malformed Item ID was passed in

exception hypy.exceptions.ContentTypeException

Bases: hypy.exceptions.HypyException

Exception to raise when Hypixel API returned the wrong content type

exception hypy.exceptions.MissingParamException

Bases: hypy.exceptions.HypyException

Exception to raise when parameters are missing

exception hypy.exceptions.InvalidSkillException

Bases: hypy.exceptions.HypyException

Exception to raise when an invalid skill was passed in

exception hypy.exceptions.InvalidProfileException

Bases: hypy.exceptions.HypyException

Exception to raise when a profile was not found

exception hypy.exceptions.InvalidProfileNameException

Bases: hypy.exceptions.HypyException

Exception to raise when an invalid profile name was passed in

exception hypy.exceptions.ExceededMaxRetries

Bases: hypy.exceptions.HypyException

Exception to raise when max retries were exceeded

exception hypy.exceptions.InvalidQueryTypeException

Bases: hypy.exceptions.HypyException

Exception to raise when an invalid query type was passed in

exception hypy.exceptions.NoProfilesFoundException

Bases: hypy.exceptions.HypyException

Exception to raise when no profiles were found

exception hypy.exceptions.NoProfileInfoAvailableException

Bases: hypy.exceptions.HypyException

Exception to raise when no profiles provide any skill information

exception hypy.exceptions.NotInGuildException

Bases: hypy.exceptions.HypyException

Exception to raise a person is not in guild but guild is queried for person

exception hypy.exceptions.MaroNoSuccess

Bases: hypy.exceptions.HypyException

Exception to raise when the Maro API returns success=false

Module contents