Library to speedup Delta Chat bot development
Project description
deltabot-cli for Python
Library to speedup Delta Chat bot development.
With this library you can focus on writing your event/message processing logic and let us handle the repetitive process of creating the bot CLI.
Install
pip install deltabot-cli
Usage
Example echo-bot written with deltabot-cli:
from deltabot_cli import BotCli, events
cli = BotCli("echobot")
@cli.on(events.RawEvent)
def log_event(bot, accid, event):
bot.logger.info(event)
@cli.on(events.NewMessage)
def echo(bot, accid, event):
msg = event.msg
bot.rpc.misc_send_text_message(accid, msg.chat_id, msg.text)
if __name__ == "__main__":
cli.start()
If you run the above script you will have a bot CLI, that allows to configure and run a bot. A progress bar is displayed while the bot is configuring, and logs are pretty-printed.
For more examples check the examples folder.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
deltabot-cli-3.1.1.tar.gz
(28.4 kB
view details)
Built Distribution
File details
Details for the file deltabot-cli-3.1.1.tar.gz
.
File metadata
- Download URL: deltabot-cli-3.1.1.tar.gz
- Upload date:
- Size: 28.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d82f81d3193f0ae0938a1365c4460f2c881ed21fb34015a01fb7627da2f7060c |
|
MD5 | 8c7ec6109493179c883156494b467a6b |
|
BLAKE2b-256 | e562a29383d30b1a1f17def242f955c0eeb5a84af7818c3165b801eeb9528805 |
Provenance
File details
Details for the file deltabot_cli-3.1.1-py3-none-any.whl
.
File metadata
- Download URL: deltabot_cli-3.1.1-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b3c03c5b5e6a43de2df75f630ab095f31f2cf504999e268f0c5d8363b460953 |
|
MD5 | 01c94ea38978014d73f529b80c4d6f46 |
|
BLAKE2b-256 | 732f29370daaf72b73697e977b4c646a30b4d40f2ba1a6af284f3476d379ea73 |