VOOZH about

URL: https://pypi.org/project/mcrcon/

⇱ mcrcon Β· PyPI


Skip to main content

mcrcon 0.7.0

pip install mcrcon

Latest release

Released:

A client for handling Remote Commands (RCON) to a Minecraft server.

Navigation

Verified details

These details have been verified by PyPI
Maintainers
πŸ‘ Avatar for aladras from gravatar.com
aladras

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: MIT License (MIT)
  • Author: Adrian Turjak
  • Tags minecraft , mcrcon , rcon , remote , command , mojang , cli
Classifiers

Project description

This library provides a straightforward implementation of Minecraft’s Rcon protocol in Python to provide a client for handling Remote Commands (RCON) to a Minecraft server.

Installation

The library is availble on PYPI and can be installed with pip:

pip install mcrcon

Usage

The recommend way to run this client is using the python β€˜with’ statement. This ensures that the socket is correctly closed when you are done with it rather than being left open.

Example:

In [1]: from mcrcon import MCRcon
In [2]: with MCRcon("10.1.1.1", "sekret") as mcr:
 ...: resp = mcr.command("/whitelist add bob")
 ...: print(resp)

While you can use it without the β€˜with’ statement, you have to connect manually, and ideally disconnect:

In [3]: mcr = MCRcon("10.1.1.1", "sekret")
In [4]: mcr.connect()
In [5]: resp = mcr.command("/whitelist add bob")
In [6]: print(resp)
In [7]: mcr.disconnect()

Command Line Usage

After installing the package a cli will be included that can be used.

Help can be gotten by doing:

mcrcon --help

You can connect from the console with commands like the following:

mcrcon 10.1.1.1

You will either be prompted for your password, or you can set it as follows as an environment variable:

export RCON_PASSWORD=sekret

And then you can run commands on the server interactively:

> /whitelist add bob

Project details

Verified details

These details have been verified by PyPI
Maintainers
πŸ‘ Avatar for aladras from gravatar.com
aladras

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: MIT License (MIT)
  • Author: Adrian Turjak
  • Tags minecraft , mcrcon , rcon , remote , command , mojang , cli
Classifiers

Download files

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

Source Distribution

mcrcon-0.7.0.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file mcrcon-0.7.0.tar.gz.

File metadata

  • Download URL: mcrcon-0.7.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.11

File hashes

Hashes for mcrcon-0.7.0.tar.gz
Algorithm Hash digest
SHA256 c2f1caf2467e283e0ccd2436f1ce21f04242b03c5fafb3860e3924d764a910d4
MD5 aad27a6cddc0d8117c509f0217bccca1
BLAKE2b-256 77486aa55387b45cb8f8c69c4034b3438bb5c5b89e45d975ff60539e9ae7d8b7

See more details on using hashes here.

Supported by

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