botoy


Namebotoy JSON
Version 9.9 PyPI version JSON
download
home_pagehttps://github.com/xiyaowong/botoy
SummaryOPQBot/IOTQQ/IOTBot的Python开发助手
upload_time2024-03-23 07:47:02
maintainerNone
docs_urlNone
authorwongxy
requires_python>=3.8
licenseMIT
keywords iotbot iotqq opq opqbot botoy
VCS
bugtrack_url
requirements httpx websockets loguru click prettytable apscheduler pydantic colorama fastapi uvicorn
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # botoy

[![QQ Group](https://img.shields.io/badge/QQ%E7%BE%A4-856337734-important?style=flat-square&logo=tencentqq)](https://jq.qq.com/?_wv=1027&k=K8iQy7i7)

[![pypi](https://img.shields.io/pypi/v/botoy?style=flat-square 'pypi')](https://pypi.org/project/botoy/)
[![python](https://img.shields.io/badge/python-3.8+-blue 'python')](https://pypi.org/project/botoy/)
[![Lines of code](https://img.shields.io/tokei/lines/github/opq-osc/botoy?label=lines&style=flat-square)](https://github.com/opq-osc/botoy)
[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/opq-osc/botoy?style=flat-square)](https://github.com/opq-osc/botoy)
[![LICENSE](https://img.shields.io/github/license/opq-osc/botoy?style=flat-square)](https://github.com/opq-osc/botoy/blob/main/LICENSE)

对机器人框架[OPQ](https://github.com/OPQBOT/OPQ/)接口的 Python 封装,
因为功能模块耦合度低, 所以你可以完全使用该框架开发,也可以选取需要的内容到自己的项目中

---

## 安装

```shell
pip install botoy -i https://pypi.org/simple --upgrade
```

## 示例

如果你配置好了 OPQ,并且配置保持默认(bot 连接地址`http://127.0.0.1:8086`),
下面示例可实现在收到群消息内容为 `test` 时回复 `ok`

新建文件 `bot.py`

```python
from botoy import bot, ctx, S

@bot
async def test():
    if ctx.g and ctx.g.text == 'test':
        await S.text('ok')

bot.print_receivers()
bot.run()
```

运行 `python bot.py`

```
+------+--------+-------+----------------+
| Name | Author | Usage |      Meta      |
+------+--------+-------+----------------+
| test |        |       | test.py line 4 |
+------+--------+-------+----------------+
ℹ️ 04-15 19:21:58 INFO 连接中[ws://localhost:8086/ws]...
✔️ 04-15 19:21:58 SUCCESS 连接成功!
```

# [文档](https://botoy.readthedocs.io/)

<!-- # [简单例子](https://github.com/opq-osc/botoy-plugins) -->

<!-- # [插件模板](https://github.com/opq-osc/botoy-plugin-template) -->

# 感谢

[yuban10703](https://github.com/yuban10703)
[milkice](https://github.com/milkice233)

# LICENSE

MIT

# CHANGE LOG

# See [releases](https://github.com/xiyaowong/botoy/releases)

## 0.0.2

- 修复模块导入错误

## V0.0.1

初次发布



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xiyaowong/botoy",
    "name": "botoy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "iotbot, iotqq, OPQ, OPQBot, botoy",
    "author": "wongxy",
    "author_email": "xiyao.wong@foxmail.com",
    "download_url": "https://files.pythonhosted.org/packages/64/43/869cb18f6f0f971a1d816d884d1a1be5a984fdba58b3a8efa2da48aa5e3d/botoy-9.9.tar.gz",
    "platform": null,
    "description": "# botoy\n\n[![QQ Group](https://img.shields.io/badge/QQ%E7%BE%A4-856337734-important?style=flat-square&logo=tencentqq)](https://jq.qq.com/?_wv=1027&k=K8iQy7i7)\n\n[![pypi](https://img.shields.io/pypi/v/botoy?style=flat-square 'pypi')](https://pypi.org/project/botoy/)\n[![python](https://img.shields.io/badge/python-3.8+-blue 'python')](https://pypi.org/project/botoy/)\n[![Lines of code](https://img.shields.io/tokei/lines/github/opq-osc/botoy?label=lines&style=flat-square)](https://github.com/opq-osc/botoy)\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/opq-osc/botoy?style=flat-square)](https://github.com/opq-osc/botoy)\n[![LICENSE](https://img.shields.io/github/license/opq-osc/botoy?style=flat-square)](https://github.com/opq-osc/botoy/blob/main/LICENSE)\n\n\u5bf9\u673a\u5668\u4eba\u6846\u67b6[OPQ](https://github.com/OPQBOT/OPQ/)\u63a5\u53e3\u7684 Python \u5c01\u88c5,\n\u56e0\u4e3a\u529f\u80fd\u6a21\u5757\u8026\u5408\u5ea6\u4f4e, \u6240\u4ee5\u4f60\u53ef\u4ee5\u5b8c\u5168\u4f7f\u7528\u8be5\u6846\u67b6\u5f00\u53d1\uff0c\u4e5f\u53ef\u4ee5\u9009\u53d6\u9700\u8981\u7684\u5185\u5bb9\u5230\u81ea\u5df1\u7684\u9879\u76ee\u4e2d\n\n---\n\n## \u5b89\u88c5\n\n```shell\npip install botoy -i https://pypi.org/simple --upgrade\n```\n\n## \u793a\u4f8b\n\n\u5982\u679c\u4f60\u914d\u7f6e\u597d\u4e86 OPQ\uff0c\u5e76\u4e14\u914d\u7f6e\u4fdd\u6301\u9ed8\u8ba4(bot \u8fde\u63a5\u5730\u5740`http://127.0.0.1:8086`)\uff0c\n\u4e0b\u9762\u793a\u4f8b\u53ef\u5b9e\u73b0\u5728\u6536\u5230\u7fa4\u6d88\u606f\u5185\u5bb9\u4e3a `test` \u65f6\u56de\u590d `ok`\n\n\u65b0\u5efa\u6587\u4ef6 `bot.py`\n\n```python\nfrom botoy import bot, ctx, S\n\n@bot\nasync def test():\n    if ctx.g and ctx.g.text == 'test':\n        await S.text('ok')\n\nbot.print_receivers()\nbot.run()\n```\n\n\u8fd0\u884c `python bot.py`\n\n```\n+------+--------+-------+----------------+\n| Name | Author | Usage |      Meta      |\n+------+--------+-------+----------------+\n| test |        |       | test.py line 4 |\n+------+--------+-------+----------------+\n\u2139\ufe0f 04-15 19:21:58 INFO \u8fde\u63a5\u4e2d[ws://localhost:8086/ws]...\n\u2714\ufe0f 04-15 19:21:58 SUCCESS \u8fde\u63a5\u6210\u529f!\n```\n\n# [\u6587\u6863](https://botoy.readthedocs.io/)\n\n<!-- # [\u7b80\u5355\u4f8b\u5b50](https://github.com/opq-osc/botoy-plugins) -->\n\n<!-- # [\u63d2\u4ef6\u6a21\u677f](https://github.com/opq-osc/botoy-plugin-template) -->\n\n# \u611f\u8c22\n\n[yuban10703](https://github.com/yuban10703)\n[milkice](https://github.com/milkice233)\n\n# LICENSE\n\nMIT\n\n# CHANGE LOG\n\n# See [releases](https://github.com/xiyaowong/botoy/releases)\n\n## 0.0.2\n\n- \u4fee\u590d\u6a21\u5757\u5bfc\u5165\u9519\u8bef\n\n## V0.0.1\n\n\u521d\u6b21\u53d1\u5e03\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "OPQBot/IOTQQ/IOTBot\u7684Python\u5f00\u53d1\u52a9\u624b",
    "version": "9.9",
    "project_urls": {
        "Homepage": "https://github.com/xiyaowong/botoy"
    },
    "split_keywords": [
        "iotbot",
        " iotqq",
        " opq",
        " opqbot",
        " botoy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a2243a43dfad4780c43a820a4f2db9c7e02400e0f82b0dde3b532a8e94b08240",
                "md5": "71382344ac0480279a626ba80b031053",
                "sha256": "2c06b84f6da605de140b9aa412b751785bab4610ff720696cd2968e55f7dcc49"
            },
            "downloads": -1,
            "filename": "botoy-9.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "71382344ac0480279a626ba80b031053",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 48498,
            "upload_time": "2024-03-23T07:46:59",
            "upload_time_iso_8601": "2024-03-23T07:46:59.548194Z",
            "url": "https://files.pythonhosted.org/packages/a2/24/3a43dfad4780c43a820a4f2db9c7e02400e0f82b0dde3b532a8e94b08240/botoy-9.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6443869cb18f6f0f971a1d816d884d1a1be5a984fdba58b3a8efa2da48aa5e3d",
                "md5": "29b4b09648c3b905e0f12e8f6b92f84f",
                "sha256": "c6655155aa5bb4bc98a4cc99e4c665895082aac0da0082493ba436297ffc166e"
            },
            "downloads": -1,
            "filename": "botoy-9.9.tar.gz",
            "has_sig": false,
            "md5_digest": "29b4b09648c3b905e0f12e8f6b92f84f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 40314,
            "upload_time": "2024-03-23T07:47:02",
            "upload_time_iso_8601": "2024-03-23T07:47:02.675003Z",
            "url": "https://files.pythonhosted.org/packages/64/43/869cb18f6f0f971a1d816d884d1a1be5a984fdba58b3a8efa2da48aa5e3d/botoy-9.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-23 07:47:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xiyaowong",
    "github_project": "botoy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "httpx",
            "specs": []
        },
        {
            "name": "websockets",
            "specs": []
        },
        {
            "name": "loguru",
            "specs": []
        },
        {
            "name": "click",
            "specs": []
        },
        {
            "name": "prettytable",
            "specs": []
        },
        {
            "name": "apscheduler",
            "specs": []
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "<",
                    "2.0"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": []
        },
        {
            "name": "fastapi",
            "specs": []
        },
        {
            "name": "uvicorn",
            "specs": []
        }
    ],
    "lcname": "botoy"
}
        
Elapsed time: 0.24392s