hypy package
Subpackages
Submodules
hypy.hypixel module
- class hypy.hypixel.Hypixel
Bases:
objectThe 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
- async get_player_status(nameOrUuid)
Returns status of player
- Parameters
nameOrUuid (
str) – The name or uuid of the player- Return type
- 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 guildguild_id (
Optional[str]) – The id of a guildplayerNameOrUuid (
Optional[str]) – The name or uuid of a guild member
- Return type
Optional[Guild]
- async get_watchdog_stats()
Gets punishment statistics
- Return type
- 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 profileuuid (
str) – The uuid of the player
- Return type
- async get_friends(nameOrUuid)
Gets Friends of given name or UUID
- Args:
nameOrUuid: The name or uuid of the player
- Return type
- async get_auctions()
Gets Hypixel SkyBlock auctions
- Return type
- async get_player_counts()
Get Hypixel Player counts
- Return type
- async update_resources()
Update Hypixel Resources
- Return type
SkyBlockResources
hypy.player module
- class hypy.player.Player
Bases:
hypy.hypyobject.HypyObject,hypy.hypixelplayer.HypixelPlayerA 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
- 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
- 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.HypyObjectA 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
- property xp: hypy.skyblockskills.SkyblockSkills
Skill xp
- Return type
- property sea_creature_kills: int
Sea creature kills of profile
- Return type
int
- property slayer: hypy.skyblockskills.SkyblockSlayers
Slayers
- Return type
- property inventory: hypy.skyblockinventories.SkyblockInventory
Inventory data
- Return type
- property backpacks: hypy.skyblockinventories.SkyblockBackpacks
Skyblock Backpacks
- Return type
- property quiver: hypy.skyblockinventories.SkyblockInventory
Skyblock Quiver
- Return type
- property ender_chest: hypy.skyblockinventories.SkyblockInventory
Skyblock Enderchest
- Return type
- property personal_vault: hypy.skyblockinventories.SkyblockInventory
Skyblock Personal Vault
- Return type
- property candy_bag: hypy.skyblockinventories.SkyblockInventory
Skyblock Candy Bag
- Return type
- property talisman_bag: hypy.skyblockinventories.SkyblockInventory
Skyblock Talisman Bag
- Return type
- property fishing_bag: hypy.skyblockinventories.SkyblockInventory
Skyblock Fishing Bag
- Return type
- property potion_bag: hypy.skyblockinventories.SkyblockInventory
Skyblock Potion Bag
- Return type
- property armor: hypy.skyblockinventories.SkyblockInventory
Armor data
- Return type
- 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
hypy.playercounts module
- class hypy.playercounts.PlayerCounts
Bases:
hypy.hypyobject.HypyObjectHypixel Player counts
Get the counts of a game with playercounts.GAME_NAME
hypy.playerstatus module
- class hypy.playerstatus.PlayerStatus
Bases:
hypy.hypyobject.HypyObjectStatus 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.HypyIterableHypixel Friends of a Player
- friends: List[hypy.hypixelfriend.HypixelFriend]
A list of HypixelFriends
- 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.HypixelPlayerA 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.HypyIterableA Hypixel Guild
- name: str
The name of the guild
- members: List[hypy.guildmember.GuildMember]
A list of GuildMembers
- 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]
- 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
hypy.guildmember module
- class hypy.guildmember.GuildMember
Bases:
hypy.hypixelplayer.HypixelPlayer,hypy.hypyobject.HypyObjectA 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.HypyObjectA 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.EnumTypes to filter Auctions by
- NAME = 1
- AUCTIONEER = 2
- LORE = 3
- class hypy.auctions.SkyblockAuctions
Bases:
hypy.hypyobject.HypyObjectSkyBlock Auction data
- async find_auctions(by='name', query='', case_sensitive=True)
Find Auctions
- Parameters
by (
Union[str,FilterType]) – What to filter byquery (
str) – The querycase_sensitive (
bool) – Whether searching should be case sensitive
- Return type
List[Auction]
hypy.auction module
- class hypy.auction.Auction
Bases:
hypy.hypyobject.HypyObjectA 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
- property nbt_item: hypy.skyblockinventories.SkyblockItemSlot
A SkyblockItemSlot for this auction
- Return type
- 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.HypyObjectA 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.HypyObjectAn 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.HypyObjectAn 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.MinecraftPlayerClass for HypixelPlayer-likes to inherit from
- async friends()
Gets HypixelFriends of the HypixelPlayer
- Return type
- async status()
Gets PlayerStatus of the HypixelPlayer
- Return type
- async name()
Gets the Name of the HypixelPlayer from the Mojang API
- Return type
str
hypy.hypyobject module
hypy.models module
- class hypy.models.KeyStats
Bases:
objectAPI 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:
objectPunishment 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:
objectA 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:
objectA 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.SkyblockInventoryA 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:
objectA list of SkyBlock backpacks
- backpacks: List[hypy.skyblockinventories.SkyblockBackpack]
A list of SkyblockBackpacks
hypy.skyblockskills module
- class hypy.skyblockskills.SkyblockSkills
Bases:
hypy.hypyobject.HypyObjectA 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.HypyObjectA 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.HypyObjectA 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.mojang module
- class hypy.mojang.NameHistoryEntry
Bases:
objectAn Entry in a players name history
- uuid: str = ''
- changed_to_at: Optional[datetime.datetime] = None
- name: str = ''
- class hypy.mojang.Mojang
Bases:
objectA 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:
objectSome 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
hypy.exceptions module
- exception hypy.exceptions.HypyException
Bases:
ExceptionA Hypy Exception
- exception hypy.exceptions.InvalidHTTPCode
Bases:
hypy.exceptions.HypyExceptionException to raise when an HTTP code is not what it was expected to be
- exception hypy.exceptions.UsernameNotFound
Bases:
hypy.exceptions.HypyExceptionException to raise when a minecraft user was not found
- exception hypy.exceptions.UUIDNotFound
Bases:
hypy.exceptions.HypyExceptionException to raise when a minecraft user was not found
- exception hypy.exceptions.InvalidAccountDescriptor
Bases:
hypy.exceptions.HypyExceptionException to raise when an invalid account descriptor was passed
- exception hypy.exceptions.HypixelNoSuccess
Bases:
hypy.exceptions.HypyExceptionException to raise when Hypixel returns success=false
- exception hypy.exceptions.NotEnoughArguments
Bases:
hypy.exceptions.HypyExceptionException to raise when not enough arguments were passed in
- exception hypy.exceptions.ApiOffException
Bases:
hypy.exceptions.HypyExceptionException to raise when a disabled API gets queried
- exception hypy.exceptions.MalformedIDException
Bases:
hypy.exceptions.HypyExceptionException to raise when a malformed Item ID was passed in
- exception hypy.exceptions.ContentTypeException
Bases:
hypy.exceptions.HypyExceptionException to raise when Hypixel API returned the wrong content type
- exception hypy.exceptions.MissingParamException
Bases:
hypy.exceptions.HypyExceptionException to raise when parameters are missing
- exception hypy.exceptions.InvalidSkillException
Bases:
hypy.exceptions.HypyExceptionException to raise when an invalid skill was passed in
- exception hypy.exceptions.InvalidProfileException
Bases:
hypy.exceptions.HypyExceptionException to raise when a profile was not found
- exception hypy.exceptions.InvalidProfileNameException
Bases:
hypy.exceptions.HypyExceptionException to raise when an invalid profile name was passed in
- exception hypy.exceptions.ExceededMaxRetries
Bases:
hypy.exceptions.HypyExceptionException to raise when max retries were exceeded
- exception hypy.exceptions.InvalidQueryTypeException
Bases:
hypy.exceptions.HypyExceptionException to raise when an invalid query type was passed in
- exception hypy.exceptions.NoProfilesFoundException
Bases:
hypy.exceptions.HypyExceptionException to raise when no profiles were found
- exception hypy.exceptions.NoProfileInfoAvailableException
Bases:
hypy.exceptions.HypyExceptionException to raise when no profiles provide any skill information
- exception hypy.exceptions.NotInGuildException
Bases:
hypy.exceptions.HypyExceptionException to raise a person is not in guild but guild is queried for person
- exception hypy.exceptions.MaroNoSuccess
Bases:
hypy.exceptions.HypyExceptionException to raise when the Maro API returns success=false