mirai-python-sdk
基于 kuriyama(Python SDK v3)的修改版本
这是什么?
以 OICQ(QQ) 协议驱动的高性能机器人开发框架 Mirai 的 Python 接口, 通过其提供的 HTTP API 与无头客户端 Mirai 交互.
开始使用
从 Pypi 安装
pip install kuriyama-lxnet
开始开发
由于 python-mirai 依赖于 mirai 提供的 mirai-http-api 插件, 所以你需要先运行一个 mirai-core 或是 mirai-console 实例以支撑你的应用运行.
依赖版本
mirai-core-all v2.6.5:https://github.com/mamoe/mirai
mirai-api-http v1.11.0:https://github.com/project-mirai/mirai-api-http ### 语音组件 #### 第三方依赖 ffmpeg 环境:https://ffmpeg.org/ #### 使用方法 MessageChain:Voice.fromFileSystem(Path, convert_type="silk") ### 示例 ```python from mirai import Mirai, Plain, MessageChain, Friend, Group, Member, Source, BotInvitedJoinGroupRequestEvent import asyncio
app = Mirai( host = “127.0.0.1”, port = “8880”, authKey = “INITKEY”, qq = “114514”, websocket = True )
@app.receiver(“FriendMessage”) async def _(app: Mirai, friend: Friend, message: MessageChain): pass
@app.receiver(“GroupMessage”) async def _(app: Mirai, group: Group, member: Member, message: MessageChain, source: Source): await app.sendGroupMessage(group, [ Plain(text=”收到消息:” + message.toString()) ], quoteSource=source) return True
@app.receiver(“BotInvitedJoinGroupRequestEvent”) async def _(app: Mirai, event: BotInvitedJoinGroupRequestEvent): await app.respondRequest(event, 1) # 自动同意入群邀请 return True
@app.receiver(“AppInitEvent”) async def _(app: Mirai): print(“应用初始化完成,您可以在此直接获取到 app”)
if name == “main“: app.run() ```
许可证
我们使用 `GNU AGPLv3 <https://choosealicense.com/licenses/agpl-3.0/>`__ 作为本项目的开源许可证, 而由于原项目 `mirai <https://github.com/mamoe/mirai>`__ 同样使用了 GNU AGPLv3 作为开源许可证, 因此你在使用时需要遵守相应的规则.
Metadata
Release files for kuriyama-lxnet 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kuriyama-lxnet-1.3.0.tar.gz | 38.7 kB | Without provenance | Details for kuriyama-lxnet-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kuriyama_lxnet-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for kuriyama_lxnet-1.3.0-py3-none-any.whl |
Total release size: 82.9 kB
Release files / kuriyama-lxnet-1.3.0.tar.gz
| Download URL | kuriyama-lxnet-1.3.0.tar.gz |
|---|---|
| Size | 38.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8294b952e2b6a1653d424d45e20df2fc5aba10c714ed4494fe679055119f742
|
|
BLAKE2b-256 checksum How to use checksums |
618b4ec560c00d7f2c2bfd2aeded716cb9e769befa8b24ef4a0de7b0e490da63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / kuriyama_lxnet-1.3.0-py3-none-any.whl
| Download URL | kuriyama_lxnet-1.3.0-py3-none-any.whl |
|---|---|
| Size | 44.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c0d10f476b73fada6fbeebc3889b79bb7fe810b18bc7b227039a00f49f27e04
|
|
BLAKE2b-256 checksum How to use checksums |
0bb6996b5b8df52f554821307112998b33a68c83e884d8dd4672c59bae085e02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Security for kuriyama-lxnet 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.