A general purpose library for command-based iteraction made for bots
Project description
Command For Bot
command4bot
is a general purpose library for command-based iteraction made for bots.
Installation
pip install command4bot
Quick Start
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
command4bot-0.4.0.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for command4bot-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 013fb67c794fdf0ccfc0f31c8a4af3c3303d8be75a01c734cbad0a2a15b30657 |
|
MD5 | 2bb3aa5bb658e3273b6cf2117dcb3318 |
|
BLAKE2b-256 | 874a09df3c30980d23eb489d2a979703bb8661ce1561e90a45d5b0e2d8e87b1c |