https://github.com/iapetus-11/aio-mc-rcon
An asynchronous RCON client/wrapper for Minecraft Java Edition
https://github.com/iapetus-11/aio-mc-rcon
aio-mc-rcon aiomcrcon async async-mcrcon asyncio mc-rcon mcrcon minecraft minecraft-java-edition minecraft-rcon rcon
Last synced: about 1 year ago
JSON representation
An asynchronous RCON client/wrapper for Minecraft Java Edition
- Host: GitHub
- URL: https://github.com/iapetus-11/aio-mc-rcon
- Owner: Iapetus-11
- License: mit
- Created: 2020-11-06T16:04:16.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T20:30:14.000Z (over 1 year ago)
- Last Synced: 2025-03-30T19:05:12.822Z (about 1 year ago)
- Topics: aio-mc-rcon, aiomcrcon, async, async-mcrcon, asyncio, mc-rcon, mcrcon, minecraft, minecraft-java-edition, minecraft-rcon, rcon
- Language: Python
- Homepage:
- Size: 124 KB
- Stars: 44
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aio-MC-RCON   
An asynchronous RCON client/wrapper written in Python for Minecraft Java Edition servers!
## Installation
```
pip install -U aio-mc-rcon
```
## Example Usage
- See the [examples folder](https://github.com/Iapetus-11/aio-mc-rcon/tree/main/examples).
## Documentation
#### *class* aiomcrcon.**Client**(host: *str*, port: *int*, password: *str*):
- Arguments:
- `host: str` - *The hostname / ip of the server to connect to.*
- `port: int` - *The port of the server to connect to.*
- `password: str` - *The password to connect, can be found as the value under `rcon.password` in the `server.properties` file.*
- Methods:
- `connect(timeout: int = 2)` - *where `timeout` has a default value of 2 seconds.*
- `send_cmd(cmd: str, timeout: int = 2)` - *where `cmd` is the command to be executed on the server and timeout has a default value of 2 seconds.*
- `close()` - *closes the connection between the client and server.*
#### *exception* aiomcrcon.**RCONConnectionError**
- *Raised when the connection to the server fails.*
#### *exception* aiomcrcon.**IncorrectPasswordError**
- *Raised when the provided password/authentication is invalid.*
#### *exception* aiomcrcon.**ClientNotConnectedError**
- *Raised when the connect() method hasn't been called yet, and commands cannot be sent.*