An async library/wrapper for interacting with remote consoles on Minecraft Java Edition servers
Project description
Aio-MC-RCON
An async RCON client written in Python for Minecraft Java Edition servers
Example Usage
import aiomcrcon
import asyncio
async def main():
client = aiomcrcon.Client('1.2.3.4:25575', 'super-secret-password')
output = await client.send_cmd('list')
print(output)
await client.close()
asyncio.run(main())
Documentation
class aiomcrcon.Client(host: str, auth: str)
- Note: It is highly recommended to call the close() coroutine on the client when the client is done being used
- Arguments:
host: str
The hostname/ip of the server to connect to, if no port is specified, the default port (25575) is used.auth: str
The authentication/password for the rcon server (This isrcon.password
in theserver.properties
file)
- Coroutines:
send_cmd(cmd: str)
- wherecmd
is the command to be sent to the serverclose()
- close the connection to the Minecraft server
class aiomcrcon.PacketTypes()
- Attributes:
LOGIN: int
- The packet id / type for a LOGIN packetCOMMAND: int
- The packet id / type for a COMMAND packetCOMMAND_RESPONSE: int
- The packet id / type for a COMMAND_RESPONSE packetINVALID_AUTH: int
- The packet id / type for an INVALID_AUTH packet
exception aiomcrcon.ConnectionFailedError - Raised when the connection to the server failed
exception aiomcrcon.InvalidAuthError - Raised when the provided password/authentication is invalid
exception aiomcrcon.InvalidDataReceivedError - Raised when the data the server sends back is invalid
exception aiomcrcon.ClientClosedError - Raised when a function is called after the client has closed its connection to the server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aio-mc-rcon-1.0.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for aio_mc_rcon-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f842afd9801e2655deafd5e494366d877c9843e6f52420e1f4a96c8e3d7d796a |
|
MD5 | 802c6e04c93d426cd9e9f7eadec5f822 |
|
BLAKE2b-256 | 9c7bd9111873ce86c2caaf8e74254ee85f26497671eef2b40ecadf5f5838e17a |