Skip to main content

An async Quake 3 RCON implementation with a CLI

Project description

aio-q3-rcon

An async Quake 3 RCON implementation for Python

Installation

pip install aio-q3-rcon

or with the cli extra

pip install aio-q3-rcon[cli]

CLI Usage

Usage: q3rcon [OPTIONS] ADDRESS PASSWORD

Options:
  -p, --port INTEGER RANGE        [1<=x<=65535]
  --timeout FLOAT RANGE           [x>=0.01]
  --fragment-read-timeout, --fr-timeout FLOAT RANGE
                                  [x>=0.01]
  --retries INTEGER RANGE         [x>=1]
  --debug
  --help                          Show this message and exit.

API Reference

Examples Folder

class Client(host: str, port: int, timeout: float, fragment_read_timeout: float, retries: int, logger: Logger | None)

  • Parameters:
    • host: str - the host / IP / domain of the server to connect to
    • port: port - the port of the server to connect to
      • default value is 27960
    • timeout: float - the timeout for network operations
      • default value is 2.0
      • for network operations with retries, the timeout applies to the rewrite attempts as a whole, rather than being per retry
    • fragment_read_timeout: float - the timeout for waiting on potentially fragmented responses
      • default value is .25
      • the Quake 3 server can sometimes send fragmented responses, since there is no consistent way to tell if a response is fragmented or not, the best solution is to wait for fragmented responses from the server whether they exist or not. This value is the timeout for waiting for those responses.
    • retries: int - the amount of retries per network operation
      • default value is 2
      • all network operations except for reads are wrapped in retry logic
    • logger: Logger | None - the logger instance
      • default value is None
      • if there is no logger specified, a logger that has disabled set to True will be used instead
      • currently only some debug information is logged
  • Methods:
    • connect(verify: bool = True) -> None
      • connects to the server
      • if verify is True, then the heartbeat RCON command is sent and the password is checked as well
      • if Client is being used as a context manager, this will be called automatically upon enter
    • close() -> None
      • closes the connection to the server
      • if Client is being used as a context manager, this will be called automatically upon exit

exception RCONError

  • Base exception all aio-q3-rcon errors derive from

exception IncorrectPasswordError

  • Raised when the provided password is incorrect

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aio-q3-rcon-1.0.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

aio_q3_rcon-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file aio-q3-rcon-1.0.0.tar.gz.

File metadata

  • Download URL: aio-q3-rcon-1.0.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.6 Darwin/21.6.0

File hashes

Hashes for aio-q3-rcon-1.0.0.tar.gz
Algorithm Hash digest
SHA256 26e14f33a16332cbba8b1920c0dbe22f26f37e80dc78fd11bc2bf34bca15f952
MD5 f7a52fa40046d7fa76842a2f97de0295
BLAKE2b-256 c34a1fa0ce305ccd5bc1a7ae8456238b1f9ae030579aa4743fe65a912c5ccdf9

See more details on using hashes here.

File details

Details for the file aio_q3_rcon-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: aio_q3_rcon-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.6 Darwin/21.6.0

File hashes

Hashes for aio_q3_rcon-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca78423ff6f2bf2e36851e35bb972698d2eaeadc02260b01950a251a8e3ca7ba
MD5 1909d1afc22b232df868c5c6f60e4689
BLAKE2b-256 7cbfa283d8718e253867c5411c68cf27bda9ad9c894aad80b29076462a9bf62c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page