ErisPulse 沙箱适配器
ErisPulse 的沙箱适配器,提供网页界面用于调试和模拟消息, 可以帮助您在不接入实际机器人平台的情况下进行开发和测试。
安装
pip install ErisPulse-SandboxAdapter
# 或者 epsdk install sandbox
配置
在 config.toml 中添加以下配置:
[SandboxAdapter]
self_id = "sandbox_bot"
enable = true
消息发送
沙箱适配器支持链式消息发送 DSL,支持以下功能:
基本发送方法
# 发送文本
adapter.Send.To("user", "123").Text("Hello")
# 发送图片
adapter.Send.To("user", "123").Image("image_url")
# 发送表情
adapter.Send.To("group", "456").Face(1)
链式修饰方法
# @用户
adapter.Send.To("group", "456").At("user123").Text("Hello")
# @全体成员
adapter.Send.To("group", "456").AtAll().Text("Everyone")
# 回复消息
adapter.Send.To("group", "456").Reply("msg_id").Text("Reply")
# 链式组合
adapter.Send.To("group", "456").At("user1").At("user2").Reply("msg_id").Text("Hello")
原始消息发送
# 发送 OneBot12 格式消息段
adapter.Send.To("group", "456").Raw_ob12([
{"type": "text", "data": {"text": "Hello"}},
{"type": "image", "data": {"file": "url"}}
])
大小写不敏感
方法名支持大小写不敏感调用:
# 以下调用方式等效
adapter.Send.To("user", "123").Text("hi")
adapter.Send.To("user", "123").text("hi")
adapter.Send.To("user", "123").TEXT("hi")
不支持的方法
调用不支持的方法时,会自动发送文本提示:
adapter.Send.To("user", "123").UnsupportedMethod("data")
# 实际发送: "[不支持的发送类型] 方法名: UnsupportedMethod, 参数: [data]"
开发
沙箱适配器可以模拟一个完整的标准适配器,可以辅助开发和调试,使用时请确保你进行了多适配器的适配 在获取到事件event后可以获取platform属性进行平台判断,具体实现请查看ErisPulse的官方文档
使用
- 启动适配器后,访问
http://localhost:8000/sandbox/(端口号根据你的配置) - 在网页中添加虚拟好友或群聊
- 选择一个聊天,发送消息
- 适配器会自动将消息转换为 OneBot12 标准事件并发送给模块
网页界面功能
Metadata
Release files for ErisPulse-SandboxAdapter 2.1.3
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 |
|---|---|---|---|---|
| erispulse_sandboxadapter-2.1.3.tar.gz | 31.1 kB | With provenance | Details for erispulse_sandboxadapter-2.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| erispulse_sandboxadapter-2.1.3-py3-none-any.whl | Python 3 | none | any | Details for erispulse_sandboxadapter-2.1.3-py3-none-any.whl |
Total release size: 59.4 kB
Release files / erispulse_sandboxadapter-2.1.3.tar.gz
| Download URL | erispulse_sandboxadapter-2.1.3.tar.gz |
|---|---|
| Size | 31.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9465fac9fc23f641221a7f60af9b679806d616d32cf7df7f0063c6907016d7c9
|
|
BLAKE2b-256 checksum How to use checksums |
ba22bc8cd07213cbfd8e673d497c57ae33cc90f4a7e2ad8d231f96381e654673
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 25, 2026.
Transparency logRelease files / erispulse_sandboxadapter-2.1.3-py3-none-any.whl
| Download URL | erispulse_sandboxadapter-2.1.3-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
560bc15597cde50370e497f530c687c250dbf874219c2d793c317d38f8dc6897
|
|
BLAKE2b-256 checksum How to use checksums |
32f8d1b411f5326ae6aa2ecd8124dbba346fcf86f6e6767105e18f12ff1fd4b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 25, 2026.
Transparency logSecurity for ErisPulse-SandboxAdapter 2.1.3
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 erispulse_sandboxadapter-2.1.3.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 Mar 25, 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.