pylav.nodes package

Subpackages

Submodules

pylav.nodes.manager module

pylav.nodes.node module

pylav.nodes.utils module

class pylav.nodes.utils.Penalty(stats)[source]

Bases: object

Represents the penalty of the stats of a Node

property cpu_penalty

The penalty of the cpu load of the node

property deficit_frame_penalty

The penalty of the deficit frames of the node

property null_frame_penalty

The penalty of the nulled frames of the node

property player_penalty

The penalty of the players playing on the node.

This is the number of players playing in the node.

property special_handling

The special handling penalty of the node.

property total

The total penalty of the node.

This is the sum of the penalties of the node.

class pylav.nodes.utils.Stats(node, data)[source]

Bases: object

Represents the stats of Lavalink node

property cpu_cores

The amount of cpu cores the system of the node has

property frames_deficit

The number of missing frames. Lavalink generates this figure by calculating how many packets to expect per minute, and deducting frames_sent. Deficit frames could mean the CPU is overloaded, and isn’t generating frames as quickly as it should be.

property frames_nulled

The number of frames that yielded null, rather than actual data

property frames_sent

The number of frames sent to Discord. .. warning:: Given that audio packets are sent via UDP, this number may not be 100% accurate due to dropped packets.

The CPU load generated by Lavalink

property memory_allocated

The amount of memory allocated to the node

property memory_free

The amount of memory free to the node

property memory_reservable

The amount of memory reservable to the node

property memory_used

The amount of memory that is used by the node

property penalty

The penalty for the node

property players

The amount of players connected to the node

property playing_players

The amount of players that are playing in the node

property system_load

The overall CPU load of the system

property uptime

How long the node has been running for in milliseconds

property uptime_seconds

How long the node has been running for in seconds

async pylav.nodes.utils.sort_key_nodes(node, region=None)[source]

The sort key for nodes.

pylav.nodes.websocket module

Module contents