asyncrcon-1.1.4
توضیحات
Client implementation of Minecrafts RCON protocol using asyncio
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | asyncrcon-1.1.4 |
| نام | asyncrcon |
| نسخه کتابخانه | 1.1.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | zekro |
| ایمیل نویسنده | contact@zekro.de |
| آدرس صفحه اصلی | https://github.com/zekrotja/asyncrcon |
| آدرس اینترنتی | https://pypi.org/project/asyncrcon/ |
| مجوز | - |
# asyncrcon
[](https://pypi.org/project/asyncrcon/) [](https://zekroTJA.github.io/asyncrcon)
asyncrcon is a client side implementation of the Minecraft RCON protocol
using asyncio sockets for non-blocing socket handling.
```
pip install asyncrcon
```
# Links
- [**Docs**](https://zekroTJA.github.io/asyncrcon)
- [**Source Code**](https://github.com/zekroTJA/asyncrcon)
- [**Examples**](https://github.com/zekroTJA/asyncrcon/tree/master/examples)
- [**License**](https://github.com/zekroTJA/asyncrcon/tree/master/LICENSE)
# Usage Example
For more examples, see [**here**](https://github.com/zekroTJA/asyncrcon/tree/master/examples).
Here, we are opening a RCON connection to add a given user to the servers whitelist. Then, we close the connection.
```py
from asyncrcon import AsyncRCON, AuthenticationException
async def add_to_whitelist(user: str):
rcon = AsyncRCON('loclahost:25575', 'secretRCONPassword')
try:
await rcon.open_connection()
except AuthenticationException:
print('Login failed: Unauthorized.')
return
res = await rcon.command('whitelist add {}'.format(user))
print(res)
rcon.close()
```
---
© 2020 Ringo Hoffmann (zekro Development)
Covered by the Apache Licence 2.0.
نحوه نصب
نصب پکیج whl asyncrcon-1.1.4:
pip install asyncrcon-1.1.4.whl
نصب پکیج tar.gz asyncrcon-1.1.4:
pip install asyncrcon-1.1.4.tar.gz