Skip to main content

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.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 beeply-native 0.1.0
File Size Uploaded Provenance Actions
beeply_native-0.1.0.tar.gz 17.1 kB With provenance Details for beeply_native-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beeply-native 0.1.0
File Interpreter ABI Platform Actions
beeply_native-0.1.0-py3-none-any.whl Python 3 none any Details for beeply_native-0.1.0-py3-none-any.whl

Total release size: 26.9 kB

Release files / beeply_native-0.1.0.tar.gz

Download URL beeply_native-0.1.0.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0621a7fe069ce4996fc40d680c70ba6da689ab215e1df3a2cf4580306a98934a
BLAKE2b-256 checksum
How to use checksums
b4878af0d96f6abe57ddc80a118a81f3635c64b8b13263231cff6be2d88c1e0b
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 24, 2026.

Transparency log

Release files / beeply_native-0.1.0-py3-none-any.whl

Download URL beeply_native-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5effc6bdf51ac9bdf67ec4841e69bbb12501ebd7ede53f0694eb536b2a6107e6
BLAKE2b-256 checksum
How to use checksums
695526c5fa1c07c50f578f7f5a8dc450601cd718eaed485908e94d62e73243e4
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 24, 2026.

Transparency log

Security for beeply-native 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for beeply_native-0.1.0.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 24, 2026.

Transparency log

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