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-py
Installing deltachat-rpc-server
This package depends on a standalone Delta Chat RPC server deltachat-rpc-server
program.
To install it check:
https://github.com/deltachat/deltachat-core-rust/tree/master/deltachat-rpc-server
Usage
Example echo-bot written with deltabot-cli:
import logging
from deltabot_cli import BotCli, events
cli = BotCli("echobot")
@cli.on(events.RawEvent)
def log_event(event):
logging.info(event)
@cli.on(events.NewMessage)
def echo(event):
event.chat.send_text(event.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.
Note: deltabot-cli uses deltachat-rpc-client library, check its documentation and examples to better understand how to use deltabot-cli.
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
Built Distribution
Hashes for deltabot_cli-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d69da506914c3b61e56c81002ab7e1da635a2c8b9c2c501d131f5ec6ae7e0ccb |
|
MD5 | 58f01092c1b4bd93e7aa61a409c3ed4e |
|
BLAKE2b-256 | 846542c0d25119d32cc0a4a925bce2dcacf3fbf72e2c33a46a7d0e47caf10aed |