Skip to main content

A package letting you interact with a Java Minecraft server through RCON

Project description

minecraft-rcon-client

A simple class to allow you to interact with a minecraft server. The server must have rcon enabled in server.properties:

enable-rcon=true
rcon.port=2000
rcon.password=secret

Usage

import asyncio

from minecraft import Server

async def main():
    ip = "1.1.1.1"
    port = 2000 # rcon port
    password = "password"

    # can be used in a context manager
    async with Server(ip, port, password) as server:
        print(await server.send("list"))

    # can also be used procedurally
    server = Server(ip, port, password, connect_on_send=True)
    # connect_on_send make it so the Server tried to reconnect if
    # it's disconnected, otherwise it raises a NotConnectedError
    print(await server.send("list"))

    for i in await server.online():
        print(f"{i} is online")

    await server.close()

asyncio.run(main())

Requirements

Python >= 3.6

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

minecraft-crazygmr101-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minecraft_crazygmr101-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file minecraft-crazygmr101-0.1.0.tar.gz.

File metadata

  • Download URL: minecraft-crazygmr101-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3

File hashes

Hashes for minecraft-crazygmr101-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72a95fb25279659fe17ce65ce2f7b3e00325301f93026fb80eb155e0209a4c92
MD5 fbbb2004f733df1596b567b14432a0d7
BLAKE2b-256 b96a4f37fe9c4a736325d5cdc8a1e40f8eb5d718eb63954dfcc2be12156f58b7

See more details on using hashes here.

File details

Details for the file minecraft_crazygmr101-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: minecraft_crazygmr101-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3

File hashes

Hashes for minecraft_crazygmr101-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c179b74d161c5dc0bd294c6583e3a0ccc3d0fe83db6a4d3b5b0f0be8438d962
MD5 740c6edd5ab7b89b808af1e6515de5a9
BLAKE2b-256 0f082931dea3ea059de2c4d5d002d19c0fc509cc863ee313e8030b8bc6598267

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page