mcipc.query package

Subpackages

Submodules

mcipc.query.client module

Query client library.

class mcipc.query.client.Client(host: str, port: int, *, timeout: float | None = None)

Bases: object

A basic client, common to Query and RCON.

property basic_stats: BasicStats

Returns basic stats.

connect() None

Contects the socket.

disconnect() bool | None

Delegates to the underlying socket’s exit method.

property full_stats: FullStats

Returns full stats.

handshake() BigEndianSignedInt32

Performs a handshake.

stats(full: bool = False) BasicStats | FullStats

Returns basic or full stats.

property timeout: float

Returns the socket timeout.

mcipc.query.config module

Query server configuration.

mcipc.query.exceptions module

Common exceptions.

exception mcipc.query.exceptions.InvalidConfig

Bases: ValueError

Indicates invalid credentials.

mcipc.query.queryclt module

Query client CLI.

mcipc.query.queryclt.main()

Runs the RCON client.

Module contents

Query client library.

class mcipc.query.Client(host: str, port: int, *, timeout: float | None = None)

Bases: object

A basic client, common to Query and RCON.

property basic_stats: BasicStats

Returns basic stats.

connect() None

Contects the socket.

disconnect() bool | None

Delegates to the underlying socket’s exit method.

property full_stats: FullStats

Returns full stats.

handshake() BigEndianSignedInt32

Performs a handshake.

stats(full: bool = False) BasicStats | FullStats

Returns basic or full stats.

property timeout: float

Returns the socket timeout.

exception mcipc.query.InvalidConfig

Bases: ValueError

Indicates invalid credentials.