Skip to main content

Library to speedup Delta Chat bot development

Project description

deltabot-cli for Python

Latest Release CI Code style: black

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


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-0.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

deltabot_cli-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file deltabot-cli-0.1.0.tar.gz.

File metadata

  • Download URL: deltabot-cli-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for deltabot-cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 578aeadfbe5471547549e3e5e3e554e9ff248e59cd96c15da3d195cd897c4b97
MD5 d0a6e5fbbc96a28744bf2b1b948da7dc
BLAKE2b-256 efd19a29e665fd995aabe054b0f12a604a8c7a1d2e258165180ad17b5a60efe7

See more details on using hashes here.

Provenance

File details

Details for the file deltabot_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deltabot_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for deltabot_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f88ab08e8267eab3183a2b9a4c7b44d3d341e706761105f8f79f3286eb6ed6d8
MD5 ea84d0d96d24333b13a77a12eb1016bf
BLAKE2b-256 8d9b86cdb27b800831ef7a16d48155eab314057f0a3a61100ddb62aa53db9e72

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page