An async rcon protocol for video games.
Project description
gamercon-async
gamercon-async
is an asynchronous Python rcon client tailored for managing and interacting with game servers such as Minecraft, Ark, and Palworld. This tool provides developers and server administrators with a powerful, non-blocking way to execute commands and handle server communications effectively.
Version
v1.0.6
Protocols
- GameRCON: This feature offers an asynchronous RCON protocol designed to connect to multiple servers simultaneously, enhancing the ability to manage and interact with game servers efficiently.
- EvrimaRCON: Specifically tailored for The Isle: Evrima, EvrimaRCON is an asynchronous RCON protocol that provides specialized support for the unique needs of this game, facilitating better server management and player interaction.
- GameRCONBase64: An advanced version of the GameRCON feature, GameRCONBase64 employs an asynchronous Base64-encoded RCON protocol. This allows for secure and efficient connections to any number of servers, ensuring a robust method for server management and communication.
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
Built Distribution
File details
Details for the file gamercon-async-1.0.6.tar.gz
.
File metadata
- Download URL: gamercon-async-1.0.6.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 125e804750dce8b0ceddf1143c37f5bd3f6dd3dc261258eb71863baa0972be8f |
|
MD5 | 6b5a28c15b82fde067412e6b291beb30 |
|
BLAKE2b-256 | 4898584a4baa2ab61932b278341056c631cd961f588c7551f823b2873fee1d61 |
File details
Details for the file gamercon_async-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: gamercon_async-1.0.6-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4118af88a7474374e6ab5b9fb9e0b10d408db66b1334d303b431315886dff499 |
|
MD5 | 4bac3e2f2fb3f100a4b0dc62c2e610f5 |
|
BLAKE2b-256 | ef76d91214cd67f5226faaf0cad4ee67a91987afa01eb721c916e52205fa7aaf |