Reference

Client

Aiomcstats.

An asyncronous minecraft server stats library

async aiomcstats.bedrock(host, port=19132, tries=3)[source]

Get status from Minecraft Bedrock server.

Parameters
  • host (str) – minecraft server address

  • port (Optional[int], optional) – port to query server otherwise it is found. Defaults to None.

  • tries (Optional[int], optional) – The amount of tries to get data from server. Defaults to 3.

Returns

Online or Offline status object.

Return type

Union[BedrockStatus, BedrockOffline]

async aiomcstats.status(host, port=None, tries=3)[source]

Get status from Minecraft server.

Parameters
  • host (str) – minecraft server address

  • port (Optional[int], optional) – port to query server otherwise it is found. Defaults to None.

  • tries (Optional[int], optional) – The amount of tries to get data from server. Defaults to 3.

Returns

Online or Offline status object.

Return type

Union[Status, OfflineStatus]

Models

class aiomcstats.models.BedrockOffline(*args, **kwargs)[source]

Offline Bedrock Status.

Parameters
  • online (boot) – Wether server online.

  • ip (boot) – Ip of server.

  • port (boot) – Port of server.

  • hostname (boot) – Hostname of server.

  • error (str) – Error which the request failed on.

class aiomcstats.models.BedrockStatus(*args, **kwargs)[source]

Bedrock Status.

Parameters
  • edition (str) – Game edition.

  • motd (str) – Message of the day.

  • protocol_version (int) – Version of the game protocol.

  • protocol_name (str) – Protocol name.

  • player_count (int) – Current number of players on the server.

  • player_max (int) – Max number of servers on the server.

  • server_id (int) – Server id.

  • latency (int) – Latency from api.

  • map (Optional[str]) – Map. Defaults to None.

  • gamemode (Optional[int]) – Current gamemode. Defaults to None.

  • gamemode_int (Optional[int]) – Current gamemode id. Defaults to None.

  • port_ipv4 (Optional[int]) – Server port for ipv4. Defaults to None.

  • port_ipv6 (Optional[int]) – Server port for ipv6. Defaults to None.

class aiomcstats.models.Debug(*args, **kwargs)[source]

Info model

Parameters
  • ping (bool) – Wether ping succeeded

  • query (bool) – Wether query is enabled.

  • srv (bool) – Wether a srv record is used.

class aiomcstats.models.Info(*args, **kwargs)[source]

Info model

Parameters
  • raw (List[str]) – Raw info with minecraft formatting.

  • clean (List[str]) – Cleaned info without minecraft formatting.

  • html (List[str]) – Html info with html formatting.

class aiomcstats.models.Mods(*args, **kwargs)[source]

Info model

Parameters
  • names (List[str]) – Names of current minecraft mods.

  • raw (Dict[str, str]) – Raw mod information.

class aiomcstats.models.Motd(*args, **kwargs)[source]

Info model

Parameters
  • raw (List[str]) – Raw motd with minecraft formatting.

  • clean (List[str]) – Cleaned motd without minecraft formatting.

  • html (List[str]) – Html motd with html formatting.

class aiomcstats.models.OfflineStatus(*args, **kwargs)[source]

Info model

Parameters
  • online – bool

  • ip – str

  • port – int

  • debug – Debug

  • hostname – Optional[str]

  • error – str

class aiomcstats.models.Players(*args, **kwargs)[source]

Info model

Parameters
  • online (int) – Current number of players online.

  • max (int) – Max number of players.

  • list (Optional[List[str]]) – Html info with html formatting.

  • uuid (Optional[Dict[str, UUID]]) – Html info with html formatting.

class aiomcstats.models.Plugins(*args, **kwargs)[source]

Info model

Parameters
  • names (List[str]) – Names of current minecraft plugins.

  • raw (Dict[str, str]) – Raw mod information.

class aiomcstats.models.Status(*args, **kwargs)[source]

Info model

Parameters
  • online (bool) – Wether server online.

  • ip (str) – Ip address of server.

  • port (int) – Port of minecraft server.

  • debug (Debug) – Debug data.

  • motd (Motd) – Motd of server.

  • players (Players) – Players in the server.

  • version (str) – Version of protocol.

  • map (str) – Current map.

  • protocol (Optional[int]) – Protocol number.

  • hostname (Optional[str]) – Hostname of server.

  • icon (Optional[str]) – Favicon of server.

  • software (Optional[str]) – Software running server.

  • plugins (Optional[Plugins]) – Plugins installed.

  • mods (Optional[Mods]) – Mods installed.

  • info (Optional[Info]) – Info provided in players rather then players.