Beeply Native SDK
beeply-native 为 Python 3.11+ 宿主提供 Beeply 客户 API。它支持求助、消息、材料、会话续期以及邮箱绑定和恢复。宿主负责界面与安全存储。
包在 PyPI 发布后可通过 pip install beeply-native 安装。仓库开发者也可用 pip install ./clients/python 安装本地版本。
接入宿主后端
在 Beeply 工作台打开 设置 → 产品与渠道 → 客户端接入,获取产品 ID 和 HTTPS API 地址。每个 API origin 和产品组合在宿主进程中持有一个客户端实例。
from beeply_native import NativeSupportClient, StateStore
def create_support(store: StateStore) -> NativeSupportClient:
return NativeSupportClient("https://api.example.com", "your-product", store)
通用宿主实现 StateStore.load() 和 StateStore.save(state)。使用宿主的加密存储保护凭据、草稿和待处理操作,并在原子写入完成后让 save 返回。CogineWork 宿主可用 CogineWorkStore(api_origin, product_id) 沿用已有的 Secret Store。UI 通过宿主 API 访问公开结果,凭据留在宿主后端。
- 已有身份用
await client.resume()读取会话。用户明确发起首次求助时,调用await client.create_guest()。 - 通过
prepare_request(text)保存提交意图,再调用await client.send_operation(operation_id)。网络结果不明时用await client.operation(operation_id)查询原操作。 - 通过
await client.conversations()和await client.messages(conversation_id)读取记录。宿主确定消息可见后,调用await client.mark_read(conversation_id, visible_cursor)。 - 显式退出使用
await client.logout()。宿主关闭时用await client.close()释放 HTTP 客户端。
SDK 以 SupportError.code 返回服务错误,以 StoreError 报告本地状态错误。恢复和重试沿用原操作 ID,验证码仅在验证时提交。
Metadata
Release files for beeply-native 0.1.2
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 |
|---|---|---|---|---|
| beeply_native-0.1.2.tar.gz | 17.1 kB | With provenance | Details for beeply_native-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| beeply_native-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for beeply_native-0.1.2-py3-none-any.whl |
Total release size: 26.9 kB
Release files / beeply_native-0.1.2.tar.gz
| Download URL | beeply_native-0.1.2.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06351d9386cd1ef9601da755dcea5eb5a5c23f927bc414ef3fbca35c53db4d80
|
|
BLAKE2b-256 checksum How to use checksums |
9946feb5c201f90b6638e52e5807e295f226a2ed2f68eec68701d6c95ff64e54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logRelease files / beeply_native-0.1.2-py3-none-any.whl
| Download URL | beeply_native-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55d2215e419096f666c0e4a5c601a208c951387ef3b5ad3c77892b2ce17f567f
|
|
BLAKE2b-256 checksum How to use checksums |
8a6e3f81a714bc0cd2a98db6c1ef4019d85dab16ed9d44f6cd887468fe5709bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logSecurity for beeply-native 0.1.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for beeply_native-0.1.2.tar.gz
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 Nov 27, 2026.
Transparency logA 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.