Skip to main content

Client implementation of Minecrafts RCON protocol using asyncio

Project description

asyncrcon

PyPI 

asyncrcon is a client side implementation of the Minecraft RCON protocol using asyncio sockets for non-blocing socket handling.

pip install asyncrcon

Links

Usage Example

For more examples, see here. Here, we are opening a RCON connection to add a given user to the servers whitelist. Then, we close the connection.

from asyncrcon import AsyncRCON, AuthenticationException

async def add_to_whitelist(user: str):
    rcon = AsyncRCON('loclahost:25575', 'secretRCONPassword')
    try:
        await rcon.open_connection()
    except AuthenticationException:
        print('Login failed: Unauthorized.')
        return

    res = await rcon.command('whitelist add {}'.format(user))
    print(res)

    rcon.close()

© 2020 Ringo Hoffmann (zekro Development)
Covered by the Apache Licence 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for asyncrcon, version 1.1.2
Filename, size File type Python version Upload date Hashes
Filename, size asyncrcon-1.1.2-py3-none-any.whl (10.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size asyncrcon-1.1.2.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page