deltabot-cli


Namedeltabot-cli JSON
Version 6.1.1 PyPI version JSON
download
home_pageNone
SummaryLibrary to speedup Delta Chat bot development
upload_time2024-04-28 01:43:53
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/72/ad/bbf8ad15c42c0a7a6b5d95a6668401e31fc40947e7bc0b90a689baa4e950/deltabot_cli-6.1.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.1.1",
    "project_urls": {
        "Homepage": "https://github.com/deltachat-bot/deltabot-cli-py"
    },
    "split_keywords": [
        "deltachat",
        " bot",
        " deltabot-cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8bea6c5007f061344f1a42704a144edb1d266506539fe6278e7ab8e57d75d15",
                "md5": "64aae6ab57d67d598417199666ab8fa3",
                "sha256": "44b250393ad088f29abc8ccf38cd57f11b9a1a7d6f2bf880127cf5fd34cceed5"
            },
            "downloads": -1,
            "filename": "deltabot_cli-6.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "64aae6ab57d67d598417199666ab8fa3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12067,
            "upload_time": "2024-04-28T01:43:52",
            "upload_time_iso_8601": "2024-04-28T01:43:52.524188Z",
            "url": "https://files.pythonhosted.org/packages/f8/be/a6c5007f061344f1a42704a144edb1d266506539fe6278e7ab8e57d75d15/deltabot_cli-6.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72adbbf8ad15c42c0a7a6b5d95a6668401e31fc40947e7bc0b90a689baa4e950",
                "md5": "185e59e00be202e00d80678a54019101",
                "sha256": "b64951b812523cbd26e0a07166ae89bb134fef7f6ed3633fed8495478e4a693e"
            },
            "downloads": -1,
            "filename": "deltabot_cli-6.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "185e59e00be202e00d80678a54019101",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 13217,
            "upload_time": "2024-04-28T01:43:53",
            "upload_time_iso_8601": "2024-04-28T01:43:53.703608Z",
            "url": "https://files.pythonhosted.org/packages/72/ad/bbf8ad15c42c0a7a6b5d95a6668401e31fc40947e7bc0b90a689baa4e950/deltabot_cli-6.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-28 01:43:53",
    "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.25373s