API

Low-level

class ts3py.Query(ip, port=10011)[source]
command(cmd, params={}, options=[])[source]

Send a command to the Teamspeak3-server and return the response.

Parameters:
  • cmd (string) – command
  • params (dict) – parameters appended to the command
  • options (list) – options appended to the command
Returns:

response of the command (if any)

Return type:

list

connect(ip, port=10011)[source]

Connect to a Teamspeak3-Server.

Parameters:
  • ip (string) – ip of the Teamspeak3-server
  • port (int) – port of the Teamspeak3-server’s query-interface
disconnect()[source]

Disconnect from the Teamspeak3-server.

High-level

class ts3py.objects.Server(host, port=10011)[source]
gm(message)[source]

Send a text message to all clients on all virtual servers

Parameters:message (str) – message to be sent
login(username, password)[source]

Login to an user-account on the server.

Parameters:
  • username (str) – name of the user
  • password (str) – password of the user
logout()[source]

Logout from the current session

virtual_servers

Return a list of virtual-servers on that server.

Returns:list of virtual-servers
Return type:list
class ts3py.objects.VirtualServer(query, params={})[source]
channel

Return a list of channel on that virtual-server.

Returns:list of channel
Return type:list
clients

Return a list of clients on that virtual-server.

Returns:list of clients
Return type:list
command(cmd, params={}, options=[])[source]

Run a command in the context of the virtual-server.

Parameters:
  • cmd (string) – command
  • params (dict) – parameters appended to the command
  • options (list) – options appended to the command
Returns:

response of the command (if any)

Return type:

list

class ts3py.objects.Channel(server, params={})[source]
clients

Return a list of clients in that channel.

Returns:list of clients
Return type:list
class ts3py.objects.Client(server, params={})[source]