deltabot-cli


Namedeltabot-cli JSON
Version 6.2.1 PyPI version JSON
download
home_pageNone
SummaryLibrary to speedup Delta Chat bot development
upload_time2025-01-09 14:41:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords deltachat bot deltabot-cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # deltabot-cli for Python

[![Latest Release](https://img.shields.io/pypi/v/deltabot-cli.svg)](https://pypi.org/project/deltabot-cli)
[![CI](https://github.com/deltachat-bot/deltabot-cli-py/actions/workflows/python-ci.yml/badge.svg)](https://github.com/deltachat-bot/deltabot-cli-py/actions/workflows/python-ci.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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

```sh
pip install deltabot-cli
```

## Usage

Example echo-bot written with deltabot-cli:

```python
from deltachat2 import MsgData, events
from deltabot_cli import BotCli

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.send_msg(accid, msg.chat_id, MsgData(text=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](./examples) folder.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "deltabot-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "deltachat, bot, deltabot-cli",
    "author": null,
    "author_email": "adbenitez <adb@merlinux.eu>",
    "download_url": "https://files.pythonhosted.org/packages/fd/b9/5f219c3d60bd676714a491bfe25ebc0691f3f6ae2e055bf4b4b1501c6c09/deltabot_cli-6.2.1.tar.gz",
    "platform": null,
    "description": "# deltabot-cli for Python\n\n[![Latest Release](https://img.shields.io/pypi/v/deltabot-cli.svg)](https://pypi.org/project/deltabot-cli)\n[![CI](https://github.com/deltachat-bot/deltabot-cli-py/actions/workflows/python-ci.yml/badge.svg)](https://github.com/deltachat-bot/deltabot-cli-py/actions/workflows/python-ci.yml)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nLibrary to speedup Delta Chat bot development.\n\nWith this library you can focus on writing your event/message processing logic and let us handle the\nrepetitive process of creating the bot CLI.\n\n## Install\n\n```sh\npip install deltabot-cli\n```\n\n## Usage\n\nExample echo-bot written with deltabot-cli:\n\n```python\nfrom deltachat2 import MsgData, events\nfrom deltabot_cli import BotCli\n\ncli = BotCli(\"echobot\")\n\n@cli.on(events.RawEvent)\ndef log_event(bot, accid, event):\n    bot.logger.info(event)\n\n@cli.on(events.NewMessage)\ndef echo(bot, accid, event):\n    msg = event.msg\n    bot.rpc.send_msg(accid, msg.chat_id, MsgData(text=msg.text))\n\nif __name__ == \"__main__\":\n    cli.start()\n```\n\nIf you run the above script you will have a bot CLI, that allows to configure and run a bot.\nA progress bar is displayed while the bot is configuring, and logs are pretty-printed.\n\nFor more examples check the [examples](./examples) folder.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Library to speedup Delta Chat bot development",
    "version": "6.2.1",
    "project_urls": {
        "Homepage": "https://github.com/deltachat-bot/deltabot-cli-py"
    },
    "split_keywords": [
        "deltachat",
        " bot",
        " deltabot-cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c661a0636882ab6c100507f44dac45fb7499070f606cca61c6b3d32a96130594",
                "md5": "15fa430c842af8d81b51ea6fea37d148",
                "sha256": "f8ed6e4f6fea650fc2cbe48076a334b93034d86fd0554cefc589047544e9cb80"
            },
            "downloads": -1,
            "filename": "deltabot_cli-6.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "15fa430c842af8d81b51ea6fea37d148",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12166,
            "upload_time": "2025-01-09T14:41:19",
            "upload_time_iso_8601": "2025-01-09T14:41:19.994423Z",
            "url": "https://files.pythonhosted.org/packages/c6/61/a0636882ab6c100507f44dac45fb7499070f606cca61c6b3d32a96130594/deltabot_cli-6.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fdb95f219c3d60bd676714a491bfe25ebc0691f3f6ae2e055bf4b4b1501c6c09",
                "md5": "6723fbbfcec71604adf1f37bcf4934ac",
                "sha256": "0f52d8078964f3f44a85755ebb69b56e30ad97df6cb9866e978da63bd1bbe06d"
            },
            "downloads": -1,
            "filename": "deltabot_cli-6.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6723fbbfcec71604adf1f37bcf4934ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 13357,
            "upload_time": "2025-01-09T14:41:21",
            "upload_time_iso_8601": "2025-01-09T14:41:21.180922Z",
            "url": "https://files.pythonhosted.org/packages/fd/b9/5f219c3d60bd676714a491bfe25ebc0691f3f6ae2e055bf4b4b1501c6c09/deltabot_cli-6.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-09 14:41:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "deltachat-bot",
    "github_project": "deltabot-cli-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "deltabot-cli"
}
        
Elapsed time: 0.63408s