YiriMirai
一个轻量级、低耦合度的基于 mirai-api-http 的 Python SDK。
本项目适用于 mirai-api-http 2.0 以上版本。
目前仍处于开发阶段,各种内容可能会有较大的变化。
安装
从 PyPI 安装:
pip install yiri-mirai
# 或者使用 poetry
poetry add yiri-mirai
此外,你还可以克隆这个仓库到本地,然后使用 poetry 安装:
git clone git@github.com:Wybxc/YiriMirai.git
cd YiriMirai
poetry install
使用
from mirai import Mirai, FriendMessage, WebSocketAdapter
if __name__ == '__main__':
bot = Mirai(12345678, adapter=WebSocketAdapter(
verify_key='your_verify_key', host='localhost', port=6090
))
@bot.on(FriendMessage)
async def on_friend_message(event: FriendMessage):
if str(event.message_chain) == '你好':
await bot.send(event, 'Hello World!')
bot.run()
社区
QQ 群:766952599(链接)
Github Discussion(链接)
Discord(链接)
开源协议
由于 mirai 及 mirai-api-http 均采用了 AGPL-3.0 开源协议,本项目同样采用 AGPL-3.0 协议。
请注意,AGPL-3.0 是传染性协议。如果你的项目引用了 YiriMirai,请在发布时公开源代码,并同样采用 AGPL-3.0 协议。
Metadata
Release files for yiri-mirai 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yiri-mirai-0.2.7.tar.gz | 65.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yiri_mirai-0.2.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 143.6 kB
Release files / yiri-mirai-0.2.7.tar.gz
| Download URL | yiri-mirai-0.2.7.tar.gz |
|---|---|
| Size | 65.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e18ff3a1d5cd35cdb5d14014b91295a646833c221fb8f088e277a6ae48de9df
|
|
BLAKE2b-256 checksum How to use checksums |
1f33eb4d8e332aa081c363e1eb8fa607b6f75ca6bd94a375833bb4607c41397e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.12 Windows/10
|
Release files / yiri_mirai-0.2.7-py3-none-any.whl
| Download URL | yiri_mirai-0.2.7-py3-none-any.whl |
|---|---|
| Size | 78.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f60078900f59a3bab6a151963166845d430ecd87bcb39c3b7dc9fb9071b6030
|
|
BLAKE2b-256 checksum How to use checksums |
790748bc9f6aa1e03571b3d6827deefc6e5907f12a6420b4ce1d401203a16d07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.12 Windows/10
|