简体中文 English 繁體中文 日本語 Русский
本文为静态镜像,内容以交互版为准 在交互式文档中心打开 →

Developer Guide

This guide helps you develop custom modules and adapters to extend the functionality of ErisPulse.

Table of Contents

Module Development

  1. Getting Started with Module Development - Create your first module
  2. Core Concepts of Modules - Core concepts and architecture of modules
  3. Event Wrapper Class Explained - Complete documentation of the Event object
  4. Best Practices for Modules - Recommendations for developing high-quality modules

Data Models

  1. Data Model Layer (ORM) - Declarative models, automatic table creation, and CRUD operations

Adapter Development

  1. Getting Started with Adapter Development - Create your first adapter
  2. Core Concepts of Adapters - Core concepts of adapters
  3. SendDSL Explained - Complete documentation of the Send message DSL
  4. Event Converters - Implementing event converters
  5. Best Practices for Adapters - Recommendations for developing high-quality adapters

Testing and Troubleshooting

  1. Module Testing (ErisPulse-Testing) - TestBot, event factories, and assertion utilities
  2. Module Troubleshooting Guide - Methods for locating issues when a module fails to load, events don't respond, or commands don't trigger

Publishing Guide

Development Preparation

Before starting development, please ensure that you:

  1. Read Basic Concepts
  2. Familiarized yourself with Event Handling
  3. Installed the development environment (Python >= 3.10)
  4. Installed the ErisPulse SDK

Development Type Selection

Choose the appropriate development type based on your needs:

Development Type Use Case Getting Started
Module Development Extend bot functionality, implement business logic, provide commands and message handling Getting Started with Module Development
Adapter Development Connect to new messaging platforms, enable cross-platform communication, provide platform-specific features Getting Started with Adapter Development

If you want to extend the bot's functionality (such as adding commands or handling messages), choose module development. If you need to connect the bot to a new platform, choose adapter development.

Development Tools

Project Templates

ErisPulse provides example projects as references:

Development Mode

Use hot-reload mode for development, where code changes automatically trigger reloads:

epsdk run main.py --reload

Debugging Tips

Enable DEBUG or TRACE level logging in config/config.toml:

[ErisPulse.logger]
# DEBUG: Outputs development and debugging information such as module loading and route registration
# TRACE: The lowest level, outputs detailed framework internal processes such as event dispatching, storage writes, and lazy loading
level = "DEBUG"

Publish Your Module

For the complete publishing process, please refer to the Publishing and Module Store Guide, which includes PyPI publishing steps and the ErisPulse module store submission process.