opengsq package

Subpackages

Submodules

opengsq.binary_reader module

class opengsq.binary_reader.BinaryReader(data: bytes)

Bases: object

remaining_bytes() int
is_end() bool
prepend_bytes(data)
read() bytes
read_byte() int
read_bytes(count: int) bytes
read_short(unsigned=True) int
read_long(unsigned=False) int
read_long_long() int
read_float() float
read_string(delimiters=[b'\x00'], encoding='utf-8', errors='ignore') str
read_pascal_string(encoding='utf-8', errors='ignore')

opengsq.cli module

class opengsq.cli.CLI

Bases: object

register(parser: ArgumentParser)
async run(args: Sequence[str]) str
opengsq.cli.main()
async opengsq.cli.main_async()

opengsq.protocol_base module

class opengsq.protocol_base.ProtocolBase(host: str, port: int, timeout: float = 5.0)

Bases: ABC

abstract property full_name: str

opengsq.protocol_socket module

class opengsq.protocol_socket.SocketKind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

SOCK_STREAM = 1
SOCK_DGRAM = 2
class opengsq.protocol_socket.Socket(kind: SocketKind)

Bases: object

async static gethostbyname(hostname: str)
settimeout(value: float)
async connect(remote_addr)
close()
send(data: bytes)
async recv() bytes
class opengsq.protocol_socket.UdpClient

Bases: Socket

async static communicate(protocol: ProtocolBase, data: bytes)
class opengsq.protocol_socket.TcpClient

Bases: Socket

async static communicate(protocol: ProtocolBase, data: bytes)

opengsq.version module

Module contents

OpenGSQ Python Library

Python library for querying game servers

copyright:
  1. 2021 BattlefieldDuck

license:

MIT, see LICENSE for more details.