https://github.com/thegamecracks/berconpy
An asynchronous Python wrapper over the BattlEye RCON protocol.
https://github.com/thegamecracks/berconpy
asyncio battleye-rcon python python-library python3 rcon
Last synced: about 1 month ago
JSON representation
An asynchronous Python wrapper over the BattlEye RCON protocol.
- Host: GitHub
- URL: https://github.com/thegamecracks/berconpy
- Owner: thegamecracks
- License: mit
- Created: 2022-06-12T15:06:44.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-30T00:35:46.000Z (2 months ago)
- Last Synced: 2026-03-30T04:28:23.763Z (2 months ago)
- Topics: asyncio, battleye-rcon, python, python-library, python3, rcon
- Language: Python
- Homepage: https://berconpy.rtfd.org/
- Size: 1 MB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# berconpy
[](https://pypi.org/project/berconpy/)
[](http://berconpy.readthedocs.io/)
[](https://docs.astral.sh/uv/)
[](https://docs.pytest.org/en/stable/)
[](https://docs.astral.sh/ruff/)
[](https://docs.astral.sh/ruff/)
An asynchronous Python wrapper over the [BattlEye RCON protocol][1].
## Features
- Easy to use event-based interface
- Automatic network loss recovery
- Included extension for Arma 3 commands and events
## Basic Usage
```py
import asyncio
import berconpy
client = berconpy.RCONClient()
IP = "XXX.XXX.XXX.XXX"
PORT = 9999
PASSWORD = "ASCII_PASSWORD"
@client.dispatch.on_login
async def on_login():
print("We have logged in!")
async def main():
async with client.connect(IP, PORT, PASSWORD):
players = await client.send_command("players")
print(players)
asyncio.run(main())
```
See the [documentation][2] for more details.
## Migrating to v3
v3.0.0 is a major rewrite of this library to isolate generic BattlEye RCON functionality
from Arma 3 / DayZ-specific features. For users that need to work with other games like
Arma Reforger, you must use v3.
For v2 users that cannot migrate, ensure that your requirements are pinned
to `berconpy~=2.1` to prevent accidentally upgrading to v3.
[v2 documentation] is still available for the time being.
[v2 documentation]: https://berconpy.readthedocs.io/en/v2.1.4/
## Installation
(**Python 3.10** or higher is required)
This package can be installed from PyPI using the following command:
```
# Linux/macOS
python3 -m pip install berconpy
# Windows
py -m pip install berconpy
```
If you want to install the development version instead, and you have git installed:
```
pip install git+https://github.com/thegamecracks/berconpy
```
## Related resources
- [BattlEye RCON protocol specification][1]
- [BattlEye RCON commands](https://www.battleye.com/support/documentation/)
- [Arma server commands](https://community.bistudio.com/wiki/Multiplayer_Server_Commands)
## License
This project uses the [MIT][3] License.
[1]: https://github.com/thegamecracks/berconpy/blob/main/docs/source/BERConProtocol.txt
[2]: https://berconpy.readthedocs.io/en/stable/
[3]: https://github.com/thegamecracks/berconpy/blob/main/LICENSE