Skip to main content

qqbotsdk-py

QQ 官方机器人 SDK 核心包:群聊 / 单聊 / 素材 / 互动 / 菜单 / 面板,以及上层框架 qqbotsdk.app。

pip install qqbotsdk-py
pip install "qqbotsdk-py[guild]"   # 额外安装频道域子包

上层框架(推荐入口)

from qqbotsdk.app import Bot, Context

bot = Bot()


@bot.on_message()
async def on_message(ctx: Context) -> None:
    await ctx.reply(f"收到:{ctx.event.content}")


bot.run()

事件监听、分发、中间件、注入与快捷回复都在这一层,详见仓库根 README.md。

API 层(薄映射)

api/ 与 model/ 是一对一的协议映射,一个接口一个函数,路径参数外置:

from qqbotsdk.api.group.messages import send_group_messages
from qqbotsdk.model.group.messages import SendGroupMessagesRequest

await send_group_messages(
    group_openid,
    SendGroupMessagesRequest(msg_type=0, content="hi"),
)

错误统一为 qqbotsdk.errors 里的三级异常;429 自动重试;删除类接口返回空结果不抛异常。

Metadata

Release files for qqbotsdk-py 2.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qqbotsdk-py 2.4.0
File Size Uploaded Provenance Actions
qqbotsdk_py-2.4.0.tar.gz 54.3 kB Without provenance Details for qqbotsdk_py-2.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qqbotsdk-py 2.4.0
File Interpreter ABI Platform Actions
qqbotsdk_py-2.4.0-py3-none-any.whl Python 3 none any Details for qqbotsdk_py-2.4.0-py3-none-any.whl

Total release size: 132.1 kB

Release files / qqbotsdk_py-2.4.0.tar.gz

Download URL qqbotsdk_py-2.4.0.tar.gz
Size 54.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f94b637fd2e848775ec1155211491c8e7b0312140ce033113bb8345fa503580f
BLAKE2b-256 checksum
How to use checksums
eb850f6f8c1eb0d6aab9b45addaf6c1af4f15b8eec7a4ac9b245769a3a4c96c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / qqbotsdk_py-2.4.0-py3-none-any.whl

Download URL qqbotsdk_py-2.4.0-py3-none-any.whl
Size 77.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d05442e4cd20ddc536f677c0ae0eeed4caf5f94ab2fddb6474829c40c08ad7a
BLAKE2b-256 checksum
How to use checksums
d108aba7e71816fd5bc9ef7a92b8676ec814d9dbb75b5e2e8477c95b340fe32a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for qqbotsdk-py 2.4.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page