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:
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):
msg = event.msg
event.rpc.misc_send_text_message(event.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-1.0.0.tar.gz
(19.4 kB
view details)
Built Distribution
File details
Details for the file deltabot-cli-1.0.0.tar.gz
.
File metadata
- Download URL: deltabot-cli-1.0.0.tar.gz
- Upload date:
- Size: 19.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 | 10f1d8f0b2c185cb8027ae46f61cfd300585b3a254898551812874c4e865c094 |
|
MD5 | 2a203aaf888a133bee70bc871b905eec |
|
BLAKE2b-256 | cdf08de15b7358258e2911829abc4825ec9581b8a5c61a9dfeb80e52050f2075 |
Provenance
File details
Details for the file deltabot_cli-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: deltabot_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 20.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 | a2efaeedb3db6212ce53c3b55cf8f88ea8f8b75b16de2c4c203a800bc2bbbe38 |
|
MD5 | 2a5af007f24d3ea617ec6af8b7277b8c |
|
BLAKE2b-256 | 3e13005d8991c462652f79d9caa8e8116d7c0c9b6b9b675bb564dba84b3d30bd |