Skip to main content

OneBot 通信协议,定义消息收发的公共数据结构

Project description

onebot-protocol

OneBot 通信协议,定义消息收发的公共数据结构。基于 OneBot 11 标准,使用 Pydantic 提供类型安全的模型定义。

功能特性

  • 完整的消息段(Message Segment)类型:文本、提及、图片、语音、视频、文件、位置、回复等
  • 支持 discriminated union,根据 type 字段自动解析消息类型

安装

pip install onebot-protocol

支持的消息类型

类型 说明
text 纯文本
mention @某人
mention_all @所有人
image 图片
voice 语音
audio 音频
video 视频
file 文件
location 位置
reply 回复

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onebot_protocol-0.0.4.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onebot_protocol-0.0.4-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file onebot_protocol-0.0.4.tar.gz.

File metadata

  • Download URL: onebot_protocol-0.0.4.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for onebot_protocol-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1cb814266bf8c2dd0c698136515a6ce3bcc92494cc5c376d6f4882d6a3562bba
MD5 920e52c7fbd9fbb9e591cd3aa54655cb
BLAKE2b-256 fdfb94ce363dd43accb7b46a357cb3eeebfda5c470190e85430757c1ee761588

See more details on using hashes here.

File details

Details for the file onebot_protocol-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for onebot_protocol-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 11977b5ee1d5ba43edaf8624d8bc840301ca83d1983ef424feaa8ffbd999d475
MD5 6455354eb40cc166f106734d126bf499
BLAKE2b-256 b3c0457409d82b721a77192b166f204d80d6e8625e52621bea23c643087d4122

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page