command4bot-0.4.1
توضیحات
A general purpose library for command-based iteraction made for bots
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | command4bot-0.4.1 |
| نام | command4bot |
| نسخه کتابخانه | 0.4.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Allan Chain |
| ایمیل نویسنده | allanchain@pku.edu.cn |
| آدرس صفحه اصلی | https://github.com/AllanChain/command4bot |
| آدرس اینترنتی | https://pypi.org/project/command4bot/ |
| مجوز | MIT |
# Command For Bot




[](https://codecov.io/gh/AllanChain/command4bot)




[](https://github.com/pre-commit/pre-commit)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
`command4bot` is a general purpose library for command-based iteraction made for bots.
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Features](#features)
- [Documentation](#documentation)
- [Todo](#todo)
## Installation
```shell
pip install command4bot
```
## Quick Start
```python
from command4bot import CommandsManager
mgr = CommandsManager()
@mgr.command
def greet(payload):
return f"Hello, {payload}!"
mgr.exec('greet John') # 'Hello, John!'
```
## Features
- Register command with a simple decorator
- Managing command open and closed status with ease
- Automatically manage command's dependency (a.k.a. `context`) with its status
- Fallback handlers if no command found
## Documentation
:warning: The documentation is still working in progress!
<https://command4bot.readthedocs.io/en/latest/>
## Todo
- [ ] Support for commands need interaction
نیازمندی
| مقدار | نام |
|---|---|
| >=3.7.4,<4.0.0) | typing_extensions |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.1,<4.0.0 | Python |
نحوه نصب
نصب پکیج whl command4bot-0.4.1:
pip install command4bot-0.4.1.whl
نصب پکیج tar.gz command4bot-0.4.1:
pip install command4bot-0.4.1.tar.gz