Metadata-Version: 2.4
Name: rconx
Version: 0.1.1b2
Summary: A Python implementation of the Source RCON protocol with client, server, and Minecraft compatibility
Author: Fallen_Breath
License-Expression: LGPL-3.0-only
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Dist: dataclasses>=0.8 ; python_full_version < '3.7'
Requires-Dist: importlib-metadata>=1.0 ; python_full_version < '3.8'
Requires-Dist: typing-extensions>=4.1
Requires-Dist: rconx-cli>=0.1.0 ; extra == 'cli'
Requires-Python: >=3.6
Project-URL: Repository, https://github.com/Fallen-Breath/rconx
Project-URL: Issues, https://github.com/Fallen-Breath/rconx/issues
Provides-Extra: cli
Description-Content-Type: text/markdown

# rconx

[![License](https://img.shields.io/badge/license-LGPL--3.0--only-blue.svg)](LICENSE)
[![PyPI](https://img.shields.io/pypi/v/rconx.svg)](https://pypi.org/project/rconx/)
[![Python](https://img.shields.io/badge/python-3.8%2B-blue.svg)](#installation)

rconx is a Python library for communicating with TCP servers [that use the Source RCON packet format](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol). It provides synchronous and asynchronous clients for authentication and command execution, together with servers for exposing an application's own command handlers over RCON.

The clients collect command results using selectable presets, including SRCDS, Minecraft, and Cuberite. Low-level clients and servers are available for applications that need to exchange individual RCON packets. The command-line interface executes commands from a terminal or script.

## Installation

rconx supports Python 3.8 and later, with best-effort compatibility for Python 3.6 and 3.7. The examples below use Python 3.8 or later.

rconx is available on [PyPI](https://pypi.org/project/rconx/):

```sh
python -m pip install rconx
```

## Quick start

These examples execute `list` on a Minecraft server with RCON enabled.

### Synchronous client

```python
from rconx import RconClient, RconPreset

with RconClient.create("127.0.0.1", 25575, RconPreset.minecraft) as client:
	client.connect()
	client.authenticate("your-rcon-password")
	response = client.execute("list")
	print(response.text)
```

### Asynchronous client

```python
import asyncio

from rconx import AsyncRconClient, RconPreset


async def main():
	async with AsyncRconClient.create("127.0.0.1", 25575, RconPreset.minecraft) as client:
		await client.connect()
		await client.authenticate("your-rcon-password")
		response = await client.execute("list")
		print(response.text)


asyncio.run(main())
```

## Documentation

- The [client guide](docs/client.md) describes client usage, presets, command results, and error handling. It also records compatibility and testing status for individual servers.
- The [server guide](docs/server.md) describes business callbacks, connection handling, and service lifecycle.
- The [command-line guide](docs/cli.md) describes installation, command execution, interactive mode, and output handling.

## License

rconx is licensed under [LGPL-3.0-only](LICENSE).
