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.

Supported Games

  • Ark: Survival Ascended
  • The Isle: Evrima
  • Source Engine Games
  • Palworld
  • Path of Titans

Mostly any game that supports source rcon will work with this protocol.

Installation

Install gamercon-async using pip:

pip install gamercon-async

Requirements

  • Python 3.10+
  • asyncio

Usage

Quick example on how to use source games.

import asyncio
from gamercon_async import GameRCON

async def main():
   client = GameRCON('host', 'port', 'password', timeout=10)
   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.5.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

gamercon_async-1.0.5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gamercon-async-1.0.5.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for gamercon-async-1.0.5.tar.gz
Algorithm Hash digest
SHA256 8c5170fffc1a10cb1848e153f9f410738db97d1ba31ce0e70eeaf18e7df9a6ad
MD5 6170ab76b7a3c9ed6b96aa100504f268
BLAKE2b-256 c35ac878554139a711fd00c6ebe8430db2b95f717772d0eeed723f8ddad33879

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gamercon_async-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6a70f0ed31c4e68def9324e86806e2b788f0d6695586d855367e8a53bdfb6d1e
MD5 0eb700495fe41fe73a190abd0b020b20
BLAKE2b-256 882d2fb73639b524051dbed6ab0a0cae50f647fa10b3f8848d12ca1e90391001

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