Skip to main content

An async rcon client for video games.

Project description

gamercon-async

gamercon-async is an asynchronous Python client designed for games like Minecraft, Ark and Path of Titans.

Features

  • List the key features of your package.
  • Explain what makes your package stand out.

Installation

Install gamercon-async using pip:

pip install gamercon-async

Requirements

  • Python 3.10+
  • asyncio
  • struct

Usage

Quick example on how to use source games.

import asyncio
from gamercon_async import GameRCON

async def main():
   client = GameRCON('host', 'port', 'password')
   async with client as pot_client:
       response = await pot_client.send('your_command')
       print(response)

asyncio.run(main())

Replace host, port, and password with your actual credentials and 'your_command' with the command you want to send.

Example with The Isle: Evrima

import asyncio
from gamercon_async import EvrimaRCON

async def main():
   rcon = EvrimaRCON('host', port, 'password')
   await rcon.connect()
   
   save_response = await rcon.send_command(bytes('\x02', 'utf-8') + bytes('\x50', 'utf-8') + bytes('\x00', 'utf-8'))
   print(f"Save Server Response: {save_response}")
   
   announcement = "Hello, world!"
   announce_response = await rcon.send_command(bytes('\x02', 'utf-8') + bytes('\x10', 'utf-8') + announcement.encode() + bytes('\x00', 'utf-8'))
   print(f"Announcement Response: {announce_response}")

asyncio.run(main())

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

gamercon-async-1.0.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

gamercon_async-1.0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file gamercon-async-1.0.2.tar.gz.

File metadata

  • Download URL: gamercon-async-1.0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for gamercon-async-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2fafe3c2c406066b58288c4cffc3f0031397020ff23b2aaf9a3c2ba5c6092180
MD5 95c7007a53c87f9188aaba2b445d9959
BLAKE2b-256 b0ed0c879b6e171b9945c0d3991da6573a7f0a658cdb6b2644176253edcfa1b0

See more details on using hashes here.

File details

Details for the file gamercon_async-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for gamercon_async-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9a9d9daa7d5b0496616ed3696efb5507edfc1b3ebcc117732fe5d677ada23e80
MD5 1a0b32e8aec9b6c5a635d6ed5bcae73c
BLAKE2b-256 49546b344574153f7110f9cca60af8e86044e3d763d7d868feb09ab2444da5ea

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