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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deltabot-cli-3.2.2.tar.gz.
File metadata
- Download URL: deltabot-cli-3.2.2.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f1988986545b6410bb2f2fe70a284d53497cc6aab76c8ba261a065d766de32e
|
|
| MD5 |
42179566de26fd4aa5f7150f8f9b9738
|
|
| BLAKE2b-256 |
d1361ef28e09fdff3cc03259d41599c1b129071101560a9f34ad669db107011f
|
File details
Details for the file deltabot_cli-3.2.2-py3-none-any.whl.
File metadata
- Download URL: deltabot_cli-3.2.2-py3-none-any.whl
- Upload date:
- Size: 27.1 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 |
339549f69a89bbe2316f62ad001256b9f209605a52d311ac44bb131856ed60fe
|
|
| MD5 |
78ddff1c47387eb3ecd06dfce7b14db5
|
|
| BLAKE2b-256 |
d42cf4acfb55f0048a318482523fc53f544f543f17bcb687de66a465e854ccca
|