HypeR Core
基于 Python asyncio 的 QQ 机器人框架。V2 采用协议无关核心与独立适配器,V1 继续可用。
概览
HypeR Core 是一个基于 Python asyncio 的 QQ 机器人框架,提供事件系统、消息构建和类型化 API。
V1 继续保留原有接口和内置协议支持。V2 使用独立的 hyperot.v2 命名空间,把框架核心和协议适配器分开维护:
- 框架本体只负责事件、消息、API 和生命周期。
- 具体协议通过独立适配器包接入。
- 不同适配器有自己的连接配置、事件映射和扩展能力。
- 业务代码优先使用协议无关的公共事件和
client.api。
V2
V2 使用一个 Client 管理一个适配器:
import asyncio
from hyperot.v2 import Client
from hyperot.v2.events import MessageReceivedEvent
async def on_message(event: MessageReceivedEvent, client: Client) -> None:
if str(event.message) == ".ping":
await client.api.scene(event.scene_type, event.scene_id).send("pong")
async def main() -> None:
client = Client.from_appconfig("appconfig.json")
client.subscribe(MessageReceivedEvent, on_message)
await client.run()
asyncio.run(main())
适配器单独安装。例如使用 OneBot v11:
pip install hyper-bot hyperot-adapter-onebot
具体安装、连接配置和扩展能力见适配器文档。
文档
安装
需要 Python 3.11 或更高版本。
框架本体:
pip install hyper-bot
再安装一个适配器,例如:
pip install hyperot-adapter-onebot
开发
开发和构建使用 uv:
git clone https://github.com/HarcicYang/HyperBotCore
cd HyperBotCore
uv sync
许可
GPL-3.0 License
Metadata
Release files for hyper-bot 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hyper_bot-2.0.1.tar.gz | 76.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hyper_bot-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 160.6 kB
Release files / hyper_bot-2.0.1.tar.gz
| Download URL | hyper_bot-2.0.1.tar.gz |
|---|---|
| Size | 76.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7923272133edc1dccd90bbab5fa0c35965c1897edccf5ae4b68d258abaa9d43
|
|
BLAKE2b-256 checksum How to use checksums |
f0574d68e4f6769a2f345898dde001fc299a31f3b5369f365aa235d2708c2fd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logRelease files / hyper_bot-2.0.1-py3-none-any.whl
| Download URL | hyper_bot-2.0.1-py3-none-any.whl |
|---|---|
| Size | 84.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ba322da31f609228196238088322b096e2f273b5f29010610faa53837f7132c
|
|
BLAKE2b-256 checksum How to use checksums |
6981e2b6dd8091a4e4579af8085b14a5b1d0f7fe0bf504981302c412311e558d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency log