Welcome to aiopixel’s documentation!

aiopixel Documentation

class aiopixel.PixelClient(api_key: str)[source]

Asynchronus client for accessing Hypixel’s API

coroutine boosters() → typing.List[aiopixel.models.boosters.Booster][source]

Get a list of all boosters

Returns:

A list of all boosters in the queue

Return type:

list of Booster

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or is present in the response json
coroutine find_guild_by_name(name: str) → str[source]

Get the guild id for a guild with the specified name

Parameters:

name (str) – The guild name

Returns:

The guild id

Return type:

str

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or is present in the response json
  • GuildNotFound – If no guild is found
coroutine find_guild_by_uuid(uuid: str) → str[source]

Get the guild id for the specified player’s guild

Parameters:

uuid (str) – The player’s uuid

Returns:

The guild id

Return type:

str

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or is present in the response json
  • PlayerNotInGuild – If no guild is found
coroutine friends(uuid: str) → typing.List[aiopixel.models.friends.Friend][source]

Get friends of a player

Parameters:

uuid (str) – The uuid of the player to get friends of

Returns:

A list of objects representing the player’s friendships

Return type:

list of Friend

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or if an error is returned in the response json
coroutine guild(guild_id: str) → aiopixel.models.guilds.Guild[source]

Get a guild

Parameters:

guild_id (str) – The id of the guild to look up

Returns:

The requested guild

Return type:

Guild

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or is present in the response json
  • GuildNotFound – If no guild is found
coroutine leaderboards() → typing.List[aiopixel.models.leaderboards.Leaderboard][source]

Get all leaderboards

Returns:

A list of all leaderboards

Return type:

list of Leaderboard

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or is present in the response json
coroutine player_from_name(name: str) → aiopixel.models.players.Player[source]

Gets the player represented by the specified name

Parameters:

name (str) – The name of the player

Returns:

The specified player

Return type:

Player

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or is present in the response json
  • PlayerNotFound – If the player doesn’t exist or has never logged into the server
coroutine player_from_uuid(uuid: str) → aiopixel.models.players.Player[source]

Gets the player represented by the specified uuid

Parameters:

uuid (str) – The uuid of the player

Returns:

The specified player

Return type:

Player

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or is present in the response json
  • PlayerNotFound – If the player doesn’t exist or has never logged into the server
coroutine status(uuid: str) → aiopixel.models.sessions.PlayerStatus[source]

Get a player’s current status

Parameters:

uuid (str) – The player to get the status of

Returns:

The player’s current status

Return type:

PlayerStatus

Raises:
  • InvalidKeyException – If the client’s API key is not valid
  • PixelException – If an error occurs while making the request or is present in the response json
  • NoStatusForPlayer – If the specified player is offline or has this endpoint disabled via in-game settings

Models

aiopixel Models

Boosters

class aiopixel.models.Booster(_id: str, purchaser_uuid: str, amount: float, original_length: int, length: int, game_type: int, activated_at: int, stacked: list = None)[source]

A booster

coroutine purchaser_name()[source]

Get the purchaser’s name

Friends

class aiopixel.models.Friend(_id: str, sender_uuid: str, receiver_uuid: str, started: int)[source]
coroutine receiver_name()[source]

Get the username of the player who received the friend request

coroutine sender_name()[source]

Get the username of the player who sent the friend request

Guilds

class aiopixel.models.guilds.Guild(_id: str, created: int, exp: int, discord: str, joinable: bool, description: str, members: typing.List[aiopixel.models.guilds.GuildMember], name: str, tag: aiopixel.models.guilds.GuildTag, vip_count: int, mvp_count: int, ranks: typing.List[aiopixel.models.guilds.GuildRank], preferred_games: typing.List[aiopixel.gametypes.GameType], chat_throttle: int, is_listed: bool, chat_muted_until: datetime.datetime)[source]

A guild

class aiopixel.models.guilds.GuildMember(member: dict)[source]

A guild member

coroutine name()[source]

Gets the current username for this guild member

Returns:The guild member’s username
Return type:str
class aiopixel.models.guilds.GuildRank(rank: dict)[source]
class aiopixel.models.guilds.GuildTag(name: str, color: str)[source]

A guild tag

Leaderboards

class aiopixel.models.leaderboards.Leaderboard(path: str, prefix: str, count: int, leaders: typing.List[aiopixel.models.leaderboards.LeaderboardMember], title: str, game_type: aiopixel.gametypes.GameType)[source]
class aiopixel.models.leaderboards.LeaderboardMember(uuid: str)[source]
coroutine name()[source]

Get the username of a leaderboard member

Players

class aiopixel.models.players.OneTimeAchievement(data: tuple)[source]
class aiopixel.models.players.TieredAchievement(data: tuple)[source]
class aiopixel.models.players.AchievementTier(tier: int, points: int, amount: int)[source]
class aiopixel.models.players.PixelAchievements[source]
achievements = None
coroutine get_all_achievements()[source]
get_one_time_achievement(name: str)[source]
get_tiered_achievement(name: str, player_value: int)[source]
class aiopixel.models.players.PlayerAchievements(data, all_achievements: aiopixel.models.players.PixelAchievements)[source]
class aiopixel.models.players.PlayerRank(pretty_name: str)[source]

An enum representing player ranks

ADMIN = 'Admin'
BUILD_TEAM = 'Build Team'
HELPER = 'Helper'
JR_HELPER = 'Jr. Helper'
MODERATOR = 'Moderator'
MVP = 'MVP'
MVP_PLUS = 'MVP+'
NONE = ''
SUPERSTAR = 'MVP++'
VIP = 'VIP'
VIP_PLUS = 'VIP+'
YOUTUBER = 'Youtuber'
classmethod from_player_data(data: dict)[source]

Gets the player’s rank from their player data

class aiopixel.models.players.Player(_id: str, displayname: str, first_login: int, last_login: int, karma: int, network_exp: float, rank: aiopixel.models.players.PlayerRank, last_logout: int, achievements: aiopixel.models.players.PlayerAchievements, stats: list, most_recent_game_type: aiopixel.gametypes.GameType)[source]
network_level() → float[source]

Calculate the player’s network level

Returns:The player’s network level
Return type:float
online() → bool[source]

Show whether the player is online or not

Player Stats

class aiopixel.models.stats.PlayerStats(data: dict)[source]
class aiopixel.models.stats.QuakeStats(data: dict)[source]
class aiopixel.models.stats.WallsStats(data: dict)[source]
class aiopixel.models.stats.PaintballStats(data: dict)[source]
class aiopixel.models.stats.HungerGamesStats(data: dict)[source]
class aiopixel.models.stats.TNTGamesStats(data: dict)[source]
class aiopixel.models.stats.VampireZStats(data: dict)[source]
class aiopixel.models.stats.Walls3Stats(data: dict)[source]
class aiopixel.models.stats.ArcadeStats(data: dict)[source]
class aiopixel.models.stats.ArenaStats(data: dict)[source]
class aiopixel.models.stats.UHCStats(data: dict)[source]
class aiopixel.models.stats.MCGOStats(data: dict)[source]
class aiopixel.models.stats.BattlegroundStats(data: dict)[source]
class aiopixel.models.stats.SuperSmashStats(data: dict)[source]
class aiopixel.models.stats.GingerBreadStats(data: dict)[source]
class aiopixel.models.stats.HousingStats(data: dict)[source]
class aiopixel.models.stats.SkyWarsStats(data: dict)[source]
class aiopixel.models.stats.TrueCombatStats(data: dict)[source]
class aiopixel.models.stats.SpeedUHCStats(data: dict)[source]
class aiopixel.models.stats.SkyClashStats(data: dict)[source]
class aiopixel.models.stats.LegacyStats(data: dict)[source]
class aiopixel.models.stats.PrototypeStats(data: dict)[source]
class aiopixel.models.stats.BedwarsStats(data: dict)[source]
level() → float[source]

Calculate the player’s Bedwars level

Returns:The player’s Bedwars level
Return type:float
class aiopixel.models.stats.MurderMysteryStats(data: dict)[source]
class aiopixel.models.stats.BuildBattleStats(data: dict)[source]
class aiopixel.models.stats.DuelsStats(data: dict)[source]

Indices and tables