An asynchronous Python wrapper over the BattlEye RCON protocol.
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.
v3 is currently published as a pre-release version to avoid breaking existing code. Use the following command to install berconpy v3:
pip install --pre berconpy
The latest documentation presents information for 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.
- Easy to use event-based interface
- Automatic network loss recovery
- Included extension for Arma 3 commands and events
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 for more details.
(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
This project uses the MIT License.