Skip to main content
ErisPulse SandboxAdapter

ErisPulse SandboxAdapter

A web UI sandbox for developing and testing your Bot — zero platform setup.

A Sandbox adapter for the ErisPulse framework. It provides a browser interface for simulating messages — create virtual friends or group chats, send messages as them, and the adapter converts them into OneBot12 standard events for your modules.

PyPI Python License Stars Downloads ErisPulse

English | 简体中文


English

A Sandbox adapter for the ErisPulse framework, providing a web UI for debugging and simulating messages. It helps you develop and test your bot without connecting to a real bot platform.

Features

  • Web UI: Built-in browser interface for testing at http://localhost:8000/sandbox/
  • Message Simulation: Create virtual friends or group chats, then send messages as them
  • Standard Adapter Compliance: Fully simulates a standard adapter, emitting OneBot12 standard events
  • Chainable Send DSL: Supports chainable message construction (Text, Image, Face, At, Reply, etc.)
  • Case-Insensitive Methods: Method names can be called in any case (e.g., Text, text, TEXT)
  • Raw OneBot12 Sending: Send raw OneBot12 message segments via Raw_ob12

Version: v4.0.0

Installation

pip install ErisPulse-SandboxAdapter
# or epsdk install sandbox

Configuration

A default configuration is generated automatically on first run.

# config.toml
[SandboxAdapter]
self_id = "sandbox_bot"        # Sandbox bot ID (optional, default: sandbox_bot)
enable = true                  # Enable the adapter (optional, default: true)

Sending Messages

The Sandbox adapter supports the chainable message-sending DSL with the following features:

Basic Send Methods

# Send text
adapter.Send.To("user", "123").Text("Hello")

# Send image
adapter.Send.To("user", "123").Image("image_url")

# Send face/emoji
adapter.Send.To("group", "456").Face(1)

Chainable Modifiers

# @user
adapter.Send.To("group", "456").At("user123").Text("Hello")

# @all members
adapter.Send.To("group", "456").AtAll().Text("Everyone")

# Reply to a message
adapter.Send.To("group", "456").Reply("msg_id").Text("Reply")

# Chained combination
adapter.Send.To("group", "456").At("user1").At("user2").Reply("msg_id").Text("Hello")

Raw Message Sending

# Send OneBot12 format message segments
adapter.Send.To("group", "456").Raw_ob12([
    {"type": "text", "data": {"text": "Hello"}},
    {"type": "image", "data": {"file": "url"}}
])

Case-Insensitive Method Names

Method names are case-insensitive:

# The following calls are equivalent
adapter.Send.To("user", "123").Text("hi")
adapter.Send.To("user", "123").text("hi")
adapter.Send.To("user", "123").TEXT("hi")

Unsupported Methods

When an unsupported method is called, a text notice is sent automatically:

adapter.Send.To("user", "123").UnsupportedMethod("data")
# Actually sent: "[不支持的发送类型] 方法名: UnsupportedMethod, 参数: [data]"

Development

The Sandbox adapter can simulate a complete standard adapter, helping you develop and debug. When using it, ensure your code handles multiple adapters. After receiving an event, you can read the platform attribute to determine the platform. See the official ErisPulse documentation for implementation details.

Usage

  1. After starting the adapter, visit http://localhost:8000/sandbox/ (port depends on your configuration)
  2. Add virtual friends or group chats in the web UI
  3. Select a chat and send a message
  4. The adapter automatically converts the message into an OneBot12 standard event and delivers it to your modules

Web UI

ErisPulse-SandboxAdapter


中文

ErisPulse 的沙箱适配器,提供网页界面用于调试和模拟消息, 可以帮助您在不接入实际机器人平台的情况下进行开发和测试。

安装

pip install ErisPulse-SandboxAdapter
# 或者 epsdk install sandbox

配置

首次运行会自动生成默认配置。

# config.toml
[SandboxAdapter]
self_id = "sandbox_bot"        # 沙箱机器人ID(可选,默认为 sandbox_bot)
enable = true                  # 是否启用(可选,默认为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的官方文档

使用

  1. 启动适配器后,访问 http://localhost:8000/sandbox/(端口号根据你的配置)
  2. 在网页中添加虚拟好友或群聊
  3. 选择一个聊天,发送消息
  4. 适配器会自动将消息转换为 OneBot12 标准事件并发送给模块

网页界面功能

ErisPulse-SandboxAdapter

Metadata

Release files for ErisPulse-SandboxAdapter 4.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 ErisPulse-SandboxAdapter 4.1.0
File Size Uploaded
erispulse_sandboxadapter-4.1.0.tar.gz 39.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ErisPulse-SandboxAdapter 4.1.0
File Interpreter ABI Platform
erispulse_sandboxadapter-4.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 76.5 kB

Release files / erispulse_sandboxadapter-4.1.0.tar.gz

Download URL erispulse_sandboxadapter-4.1.0.tar.gz
Size 39.6 kB
Tags Source
SHA-256 checksum
How to use checksums
31e89155b4b22e83a20a28c9841591a0f78bfc9751de735a2674c9db8e287e4d
BLAKE2b-256 checksum
How to use checksums
56acea5775d79a72c70876dc3a4c7bff49145263d4a0c7672d3f503e2916856b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 12, 2026.

Transparency log

Release files / erispulse_sandboxadapter-4.1.0-py3-none-any.whl

Download URL erispulse_sandboxadapter-4.1.0-py3-none-any.whl
Size 36.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a921c81fe45b6c9a7429869e30c80da74140e8f2f98d6825be555500d38ba134
BLAKE2b-256 checksum
How to use checksums
cefb2fafe757918ae80fad018d6a0b1a68d94ada7adfc24e84078b4fbeabed18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.1.0 This release

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

2.2.5

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.0

2 release files

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