<div align="center">
# Rainfer
_Modified from Ariadne & Another elegant Python QQ Bot framework for mirai and mirai-api-http v2._
> 希望落空时间
<a href="https://pypi.org/project/graia-ariadne"><img alt="PyPI" src="https://img.shields.io/pypi/v/aworda-rainfer" /></a></td>
<a href="https://pypi.org/project/graia-ariadne"><img alt="PyPI Pre Release" src="https://img.shields.io/github/v/tag/AwordaProject/Rainfer?include_prereleases&label=latest&color=orange"></td>
<a href="https://pypi.org/project/graia-ariadne"><img alt="Python Version" src="https://img.shields.io/pypi/pyversions/aworda-rainfer" /></a>
<a href="https://pypi.org/project/graia-ariadne"><img alt="Python Implementation" src="https://img.shields.io/pypi/implementation/aworda-rainfer"></a>
<a href="https://nodocs.lol"><img alt="docs" src="https://img.shields.io/badge/文档-here-blue" /></a>
<a href="https://nodocs.lol"><img alt="API docs" src="https://img.shields.io/badge/API_文档-here-purple"></a>
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-black.svg" alt="black" /></a>
<a href="https://pycqa.github.io/isort/"><img src="https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat" alt="isort"/></a>
<a href="https://github.com/AwordaProject/Rainfer/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/GraiaProject/Rainfer"></a>
</div>
**本项目适用于 mirai-api-http 2.0 以上版本**.
Rainfer 是 修改自 `Graia Project` [`Ariadne`](https://github.com/GraiaProject/Ariadne) 0.6.16 的一个很烂活
Ariadne 是很好的项目,拥有广阔的未来,本框架就不要用了,去用 Ariadne 吧,
之后随着 GraiaProject 的不断开发迭代, Ariadne将会支持更多平台并拥有 module Market Place
**注意, 本框架需要 [`mirai-api-http v2`](https://github.com/project-mirai/mirai-api-http).**
## 安装
`poetry add aworda-rainfer`
或
`pip install aworda-rainfer`
> 我们强烈建议使用 [`poetry`](https://python-poetry.org) 进行包管理
## 开始使用
```python
from aworda.rainfer.app import Rainfer
from aworda.rainfer.message.chainx import MessageChainX
from aworda.rainfer.message.element import Plain
from aworda.rainfer.model import Friend, MiraiSession
app = Rainfer(MiraiSession(host="http://localhost:8080", verify_key="ServiceVerifyKey", account=123456789))
@app.broadcast.receiver("FriendMessage")
async def friend_message_listener(app: Rainfer, friend: Friend):
await app.sendMessage(friend, MessageChain.Plain("Hello, World!"))
app.launch_blocking()
```
Thanks for your reading ~
Raw data
{
"_id": null,
"home_page": "https://github.com/AwordaProject/Rainfer",
"name": "aworda-rainfer",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "graia,bot,qq,framework,mirai",
"author": "LinNian",
"author_email": "crynian@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/28/74/d8d92d47d23883739806cdae131c0b240a6b9c07e8ad445eb0871a17eec5/aworda-rainfer-0.0.1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n# Rainfer\n\n_Modified from Ariadne & Another elegant Python QQ Bot framework for mirai and mirai-api-http v2._\n\n> \u5e0c\u671b\u843d\u7a7a\u65f6\u95f4\n\n<a href=\"https://pypi.org/project/graia-ariadne\"><img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/aworda-rainfer\" /></a></td>\n<a href=\"https://pypi.org/project/graia-ariadne\"><img alt=\"PyPI Pre Release\" src=\"https://img.shields.io/github/v/tag/AwordaProject/Rainfer?include_prereleases&label=latest&color=orange\"></td>\n<a href=\"https://pypi.org/project/graia-ariadne\"><img alt=\"Python Version\" src=\"https://img.shields.io/pypi/pyversions/aworda-rainfer\" /></a>\n<a href=\"https://pypi.org/project/graia-ariadne\"><img alt=\"Python Implementation\" src=\"https://img.shields.io/pypi/implementation/aworda-rainfer\"></a>\n<a href=\"https://nodocs.lol\"><img alt=\"docs\" src=\"https://img.shields.io/badge/\u6587\u6863-here-blue\" /></a>\n<a href=\"https://nodocs.lol\"><img alt=\"API docs\" src=\"https://img.shields.io/badge/API_\u6587\u6863-here-purple\"></a>\n<a href=\"https://github.com/psf/black\"><img src=\"https://img.shields.io/badge/code%20style-black-black.svg\" alt=\"black\" /></a>\n<a href=\"https://pycqa.github.io/isort/\"><img src=\"https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\" alt=\"isort\"/></a>\n<a href=\"https://github.com/AwordaProject/Rainfer/blob/master/LICENSE\"><img alt=\"License\" src=\"https://img.shields.io/github/license/GraiaProject/Rainfer\"></a>\n\n</div>\n\n**\u672c\u9879\u76ee\u9002\u7528\u4e8e mirai-api-http 2.0 \u4ee5\u4e0a\u7248\u672c**.\n\nRainfer \u662f \u4fee\u6539\u81ea `Graia Project` [`Ariadne`](https://github.com/GraiaProject/Ariadne) 0.6.16 \u7684\u4e00\u4e2a\u5f88\u70c2\u6d3b\n\nAriadne \u662f\u5f88\u597d\u7684\u9879\u76ee\uff0c\u62e5\u6709\u5e7f\u9614\u7684\u672a\u6765\uff0c\u672c\u6846\u67b6\u5c31\u4e0d\u8981\u7528\u4e86\uff0c\u53bb\u7528 Ariadne \u5427\uff0c\n\n\u4e4b\u540e\u968f\u7740 GraiaProject \u7684\u4e0d\u65ad\u5f00\u53d1\u8fed\u4ee3\uff0c Ariadne\u5c06\u4f1a\u652f\u6301\u66f4\u591a\u5e73\u53f0\u5e76\u62e5\u6709 module Market Place\n\n**\u6ce8\u610f, \u672c\u6846\u67b6\u9700\u8981 [`mirai-api-http v2`](https://github.com/project-mirai/mirai-api-http).**\n\n## \u5b89\u88c5\n\n`poetry add aworda-rainfer`\n\n\u6216\n\n`pip install aworda-rainfer`\n\n> \u6211\u4eec\u5f3a\u70c8\u5efa\u8bae\u4f7f\u7528 [`poetry`](https://python-poetry.org) \u8fdb\u884c\u5305\u7ba1\u7406\n\n## \u5f00\u59cb\u4f7f\u7528\n\n```python\nfrom aworda.rainfer.app import Rainfer\nfrom aworda.rainfer.message.chainx import MessageChainX\nfrom aworda.rainfer.message.element import Plain\nfrom aworda.rainfer.model import Friend, MiraiSession\n\napp = Rainfer(MiraiSession(host=\"http://localhost:8080\", verify_key=\"ServiceVerifyKey\", account=123456789))\n\n\n@app.broadcast.receiver(\"FriendMessage\")\nasync def friend_message_listener(app: Rainfer, friend: Friend):\n await app.sendMessage(friend, MessageChain.Plain(\"Hello, World!\"))\n\n\napp.launch_blocking()\n```\n\nThanks for your reading ~\n",
"bugtrack_url": null,
"license": "",
"summary": "Modified from Ariadne & Another elegant Python QQ Bot framework for mirai and mirai-api-http v2.",
"version": "0.0.1",
"split_keywords": [
"graia",
"bot",
"qq",
"framework",
"mirai"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "3f2156a5d2d62940cea0a45b259c561f",
"sha256": "c870194da2ac88aef20ef07586c6bc7b1c4f87fceadb8f55aec40210a865775a"
},
"downloads": -1,
"filename": "aworda_rainfer-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3f2156a5d2d62940cea0a45b259c561f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 105870,
"upload_time": "2022-12-23T08:30:48",
"upload_time_iso_8601": "2022-12-23T08:30:48.176580Z",
"url": "https://files.pythonhosted.org/packages/d8/c9/497935a507565b73ac350fc1cbabb35965ec298f62a844385bc1d1a2bfcb/aworda_rainfer-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "cb7a5943f881cd9a82dc766c454dd03e",
"sha256": "f6f8874cb85d8d8abe695d87a52cf385f1128c31b00890a950ab9d11ecaad522"
},
"downloads": -1,
"filename": "aworda-rainfer-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "cb7a5943f881cd9a82dc766c454dd03e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 91393,
"upload_time": "2022-12-23T08:30:46",
"upload_time_iso_8601": "2022-12-23T08:30:46.731253Z",
"url": "https://files.pythonhosted.org/packages/28/74/d8d92d47d23883739806cdae131c0b240a6b9c07e8ad445eb0871a17eec5/aworda-rainfer-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-23 08:30:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "AwordaProject",
"github_project": "Rainfer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aworda-rainfer"
}