ErisPulse 2.4.0.dev3__tar.gz → 2.4.2.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/PKG-INFO +45 -14
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/README.md +216 -189
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/pyproject.toml +5 -1
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/cli.py +4 -57
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/cli.pyi +1 -16
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/init.py +1 -1
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/install.py +6 -64
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/install.pyi +1 -3
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/list.py +2 -32
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/list_remote.py +2 -24
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/uninstall.py +0 -9
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/registry.py +5 -33
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/registry.pyi +1 -23
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/utils/package_manager.py +76 -63
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/utils/package_manager.pyi +4 -6
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/__init__.py +7 -1
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/__init__.pyi +1 -2
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/base.py +56 -16
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/base.pyi +1 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/command.py +3 -2
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/message.py +9 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/message.pyi +8 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/message_builder.py +0 -25
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/message_builder.pyi +0 -21
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/meta.py +9 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/meta.pyi +8 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/notice.py +9 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/notice.pyi +8 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/request.py +9 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/request.pyi +8 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/wrapper.py +440 -12
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/wrapper.pyi +194 -6
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/adapter.py +152 -21
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/adapter.pyi +13 -2
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/module.py +68 -1
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/module.pyi +33 -1
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/router.py +76 -1
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/router.pyi +28 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/__init__.py +1 -3
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/__init__.pyi +1 -2
- erispulse-2.4.0.dev3/src/ErisPulse/finders/cli.py +0 -120
- erispulse-2.4.0.dev3/src/ErisPulse/finders/cli.pyi +0 -94
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/.gitignore +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/LICENSE +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/base.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/base.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/init.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/list.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/list_remote.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/run.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/run.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/self_update.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/self_update.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/uninstall.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/upgrade.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/commands/upgrade.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/console.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/console.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/utils/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/CLI/utils/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Bases/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Bases/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Bases/adapter.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Bases/adapter.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Bases/manager.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Bases/manager.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Bases/module.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Bases/module.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/command.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/session_type.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/Event/session_type.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/config.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/config.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/lifecycle.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/lifecycle.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/logger.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/logger.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/storage.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/Core/storage.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/__main__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/__main__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/adapter.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/adapter.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/bases/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/bases/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/bases/finder.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/bases/finder.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/module.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/finders/module.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/adapter.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/adapter.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/bases/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/bases/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/bases/loader.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/bases/loader.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/module.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/module.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/strategy.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/loaders/strategy.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/runtime/__init__.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/runtime/__init__.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/runtime/cleanup.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/runtime/cleanup.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/runtime/exceptions.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/runtime/exceptions.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/runtime/frame_config.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/runtime/frame_config.pyi +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/sdk.py +0 -0
- {erispulse-2.4.0.dev3 → erispulse-2.4.2.dev0}/src/ErisPulse/sdk.pyi +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ErisPulse
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.2.dev0
|
|
4
4
|
Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
|
|
5
5
|
Author-email: ErisDev <erisdev@88.com>
|
|
6
6
|
Maintainer-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com>
|
|
@@ -51,15 +51,19 @@ Requires-Dist: rich>=13.0.0
|
|
|
51
51
|
Requires-Dist: toml>=0.10.2
|
|
52
52
|
Requires-Dist: watchdog>=4.0.0
|
|
53
53
|
Provides-Extra: dev
|
|
54
|
+
Requires-Dist: httpx>=0.24.0; extra == 'dev'
|
|
54
55
|
Requires-Dist: pyclean>=3.6.0; extra == 'dev'
|
|
55
56
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
57
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == 'dev'
|
|
56
58
|
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
57
59
|
Requires-Dist: pytest-mock>=3.10.0; extra == 'dev'
|
|
58
60
|
Requires-Dist: pytest-xdist>=3.0.0; extra == 'dev'
|
|
59
61
|
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
60
62
|
Requires-Dist: ruff>=0.1.7; extra == 'dev'
|
|
61
63
|
Provides-Extra: test
|
|
64
|
+
Requires-Dist: httpx>=0.24.0; extra == 'test'
|
|
62
65
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'test'
|
|
66
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == 'test'
|
|
63
67
|
Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
|
|
64
68
|
Requires-Dist: pytest-mock>=3.10.0; extra == 'test'
|
|
65
69
|
Requires-Dist: pytest-xdist>=3.0.0; extra == 'test'
|
|
@@ -85,8 +89,10 @@ Description-Content-Type: text/markdown
|
|
|
85
89
|
|
|
86
90
|
[](https://pypi.org/project/ErisPulse/)
|
|
87
91
|
[](https://pypi.org/project/ErisPulse/)
|
|
92
|
+
[](https://hub.docker.com/r/erispulse/erispulse)
|
|
93
|
+
[](https://hub.docker.com/r/erispulse/erispulse)
|
|
94
|
+
[](https://hub.docker.com/r/erispulse/erispulse)
|
|
88
95
|
[](https://github.com/astral-sh/ruff)
|
|
89
|
-
[](https://socket.dev/pypi/package/ErisPulse)
|
|
90
96
|
|
|
91
97
|
</td>
|
|
92
98
|
</tr>
|
|
@@ -108,7 +114,30 @@ ErisPulse 是一个基于 Python 的事件驱动型多平台机器人开发框
|
|
|
108
114
|
|
|
109
115
|
## 快速开始
|
|
110
116
|
|
|
111
|
-
###
|
|
117
|
+
### 使用 Docker (推荐)
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
docker pull erispulse/erispulse:latest
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
<details>
|
|
124
|
+
<summary>快速启动</summary>
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# 下载 docker-compose.yml
|
|
128
|
+
curl -O https://raw.githubusercontent.com/ErisPulse/ErisPulse/main/docker-compose.yml
|
|
129
|
+
|
|
130
|
+
# 设置 Dashboard 登录令牌并启动
|
|
131
|
+
ERISPULSE_DASHBOARD_TOKEN=your-token docker compose up -d
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
> 镜像内置 ErisPulse 框架和 Dashboard 管理面板,支持 `linux/amd64` 和 `linux/arm64` 架构。
|
|
135
|
+
|
|
136
|
+
</details>
|
|
137
|
+
|
|
138
|
+
启动后访问 `http://localhost:8000/Dashboard`,使用设置的令牌作为密码登录 Dashboard 管理面板。
|
|
139
|
+
|
|
140
|
+
### 使用 pip 安装
|
|
112
141
|
|
|
113
142
|
```bash
|
|
114
143
|
pip install ErisPulse
|
|
@@ -116,8 +145,8 @@ pip install ErisPulse
|
|
|
116
145
|
# 国内镜像
|
|
117
146
|
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ErisPulse
|
|
118
147
|
|
|
119
|
-
# 使用
|
|
120
|
-
uv install ErisPulse
|
|
148
|
+
# 使用 uv 安装
|
|
149
|
+
uv pip install ErisPulse
|
|
121
150
|
```
|
|
122
151
|
|
|
123
152
|

|
|
@@ -206,14 +235,16 @@ epsdk run main.py --reload
|
|
|
206
235
|
|
|
207
236
|
欢迎您贡献适配器!
|
|
208
237
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
238
|
+
| 适配器 | 说明 |
|
|
239
|
+
|--------|------|
|
|
240
|
+
| [云湖](https://github.com/ErisPulse/ErisPulse-YunhuAdapter) | 企业级即时通讯平台(机器人账户) |
|
|
241
|
+
| [云湖用户](https://github.com/wsu2059q/ErisPulse-YunhuUserAdapter) | 基于云湖用户账户的适配器 |
|
|
242
|
+
| [Telegram](https://github.com/ErisPulse/ErisPulse-TelegramAdapter) | 全球性即时通讯软件 |
|
|
243
|
+
| [OneBot11](https://github.com/ErisPulse/ErisPulse-OneBot11Adapter) | 通用机器人接口标准 |
|
|
244
|
+
| [OneBot12](https://github.com/ErisPulse/ErisPulse-OneBot12Adapter) | OneBot12 标准 |
|
|
245
|
+
| [邮件](https://github.com/ErisPulse/ErisPulse-EmailAdapter) | 邮件收发处理 |
|
|
246
|
+
| [沙箱](https://github.com/ErisPulse/ErisPulse-SandboxAdapter) | 网页调试界面,无需接入实际平台 |
|
|
247
|
+
| [Kook](https://github.com/shanfishapp/ErisPulse-KookAdapter) | Kook(开黑啦)即时通讯平台 |
|
|
217
248
|
|
|
218
249
|
查看 [适配器详情介绍](docs/zh-CN/platform-guide/README.md)
|
|
219
250
|
|
|
@@ -254,4 +285,4 @@ ErisPulse 项目的健全性还需要您的一份力!我们欢迎各种形式
|
|
|
254
285
|
|
|
255
286
|
- 本项目部分代码基于 [sdkFrame](https://github.com/runoneall/sdkFrame)
|
|
256
287
|
- 核心适配器标准化层基于 [OneBot12 规范](https://12.onebot.dev/)
|
|
257
|
-
- 感谢所有为开源社区做出贡献的开发者和作者
|
|
288
|
+
- 感谢所有为开源社区做出贡献的开发者和作者
|
|
@@ -1,189 +1,216 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
[English](README.en.md) | [简体中文](README.md) | [繁體中文](README.zh-TW.md)
|
|
4
|
-
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<table>
|
|
8
|
-
<tr>
|
|
9
|
-
<td width="35%" valign="middle" align="center">
|
|
10
|
-
<img src=".github/assets/erispulse_logo_1024.png" width="280" alt="ErisPulse" />
|
|
11
|
-
</td>
|
|
12
|
-
<td width="65%" valign="middle">
|
|
13
|
-
|
|
14
|
-
# ErisPulse
|
|
15
|
-
|
|
16
|
-
**事件驱动的多平台机器人开发框架**
|
|
17
|
-
|
|
18
|
-
[](https://pypi.org/project/ErisPulse/)
|
|
19
|
-
[](https://pypi.org/project/ErisPulse/)
|
|
20
|
-
[ | [简体中文](README.md) | [繁體中文](README.zh-TW.md)
|
|
4
|
+
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<table>
|
|
8
|
+
<tr>
|
|
9
|
+
<td width="35%" valign="middle" align="center">
|
|
10
|
+
<img src=".github/assets/erispulse_logo_1024.png" width="280" alt="ErisPulse" />
|
|
11
|
+
</td>
|
|
12
|
+
<td width="65%" valign="middle">
|
|
13
|
+
|
|
14
|
+
# ErisPulse
|
|
15
|
+
|
|
16
|
+
**事件驱动的多平台机器人开发框架**
|
|
17
|
+
|
|
18
|
+
[](https://pypi.org/project/ErisPulse/)
|
|
19
|
+
[](https://pypi.org/project/ErisPulse/)
|
|
20
|
+
[](https://hub.docker.com/r/erispulse/erispulse)
|
|
21
|
+
[](https://hub.docker.com/r/erispulse/erispulse)
|
|
22
|
+
[](https://hub.docker.com/r/erispulse/erispulse)
|
|
23
|
+
[](https://github.com/astral-sh/ruff)
|
|
24
|
+
|
|
25
|
+
</td>
|
|
26
|
+
</tr>
|
|
27
|
+
</table>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 简介
|
|
32
|
+
|
|
33
|
+
ErisPulse 是一个基于 Python 的事件驱动型多平台机器人开发框架。通过统一的 OneBot12 标准接口,您可以一次编写代码,同时在云湖、Telegram、OneBot 等多个平台部署相同功能的机器人。框架提供灵活的模块(`插件`)系统、热重载支持和完整的开发者工具链,适用于从简单聊天机器人到复杂自动化系统的各种场景。
|
|
34
|
+
|
|
35
|
+
## 核心特性
|
|
36
|
+
|
|
37
|
+
- **事件驱动架构** - 基于 OneBot12 标准的清晰事件模型
|
|
38
|
+
- **跨平台兼容** - 插件模块编写一次即可在所有平台使用
|
|
39
|
+
- **模块化设计** - 灵活的插件系统,易于扩展和集成
|
|
40
|
+
- **热重载支持** - 开发时无需重启即可重新加载代码
|
|
41
|
+
- **完整工具链** - 提供 CLI 工具、包管理和自动化脚本
|
|
42
|
+
|
|
43
|
+
## 快速开始
|
|
44
|
+
|
|
45
|
+
### 使用 Docker (推荐)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
docker pull erispulse/erispulse:latest
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
<details>
|
|
52
|
+
<summary>快速启动</summary>
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 下载 docker-compose.yml
|
|
56
|
+
curl -O https://raw.githubusercontent.com/ErisPulse/ErisPulse/main/docker-compose.yml
|
|
57
|
+
|
|
58
|
+
# 设置 Dashboard 登录令牌并启动
|
|
59
|
+
ERISPULSE_DASHBOARD_TOKEN=your-token docker compose up -d
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
> 镜像内置 ErisPulse 框架和 Dashboard 管理面板,支持 `linux/amd64` 和 `linux/arm64` 架构。
|
|
63
|
+
|
|
64
|
+
</details>
|
|
65
|
+
|
|
66
|
+
启动后访问 `http://localhost:8000/Dashboard`,使用设置的令牌作为密码登录 Dashboard 管理面板。
|
|
67
|
+
|
|
68
|
+
### 使用 pip 安装
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install ErisPulse
|
|
72
|
+
|
|
73
|
+
# 国内镜像
|
|
74
|
+
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ErisPulse
|
|
75
|
+
|
|
76
|
+
# 使用 uv 安装
|
|
77
|
+
uv pip install ErisPulse
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+
> 如果您的 Python 版本低于 3.10,可以使用一键安装脚本自动配置环境。详见 [安装脚本说明](scripts/install/)。
|
|
83
|
+
|
|
84
|
+
### 初始化项目
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# 交互式初始化
|
|
88
|
+
epsdk init
|
|
89
|
+
|
|
90
|
+
# 快速初始化(指定项目名称)
|
|
91
|
+
epsdk init -q -n my_bot
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 创建第一个机器人
|
|
95
|
+
|
|
96
|
+
创建 `main.py` 文件:
|
|
97
|
+
|
|
98
|
+
<table>
|
|
99
|
+
<tr>
|
|
100
|
+
<td width="50%" valign="top">
|
|
101
|
+
|
|
102
|
+
**命令处理器**
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from ErisPulse import sdk
|
|
106
|
+
from ErisPulse.Core.Event import command
|
|
107
|
+
|
|
108
|
+
@command("hello", help="发送问候消息")
|
|
109
|
+
async def hello_handler(event):
|
|
110
|
+
user_name = event.get_user_nickname() or "朋友"
|
|
111
|
+
await event.reply(f"你好,{user_name}!")
|
|
112
|
+
|
|
113
|
+
@command("ping", help="测试机器人是否在线")
|
|
114
|
+
async def ping_handler(event):
|
|
115
|
+
await event.reply("Pong!机器人运行正常。")
|
|
116
|
+
|
|
117
|
+
if __name__ == "__main__":
|
|
118
|
+
import asyncio
|
|
119
|
+
asyncio.run(sdk.run(keep_running=True))
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
</td>
|
|
123
|
+
<td width="50%" valign="top">
|
|
124
|
+
|
|
125
|
+
**效果说明**
|
|
126
|
+
|
|
127
|
+
发送 `/hello`
|
|
128
|
+
|
|
129
|
+
机器人回复:`你好,{用户名}!`
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
发送 `/ping`
|
|
134
|
+
|
|
135
|
+
机器人回复:`Pong!机器人运行正常。`
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
**运行方式**
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
epsdk run main.py
|
|
143
|
+
# 或开发模式
|
|
144
|
+
epsdk run main.py --reload
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
</td>
|
|
148
|
+
</tr>
|
|
149
|
+
</table>
|
|
150
|
+
|
|
151
|
+
更多详细说明请参阅:
|
|
152
|
+
- [快速开始指南](docs/zh-CN/quick-start.md)
|
|
153
|
+
- [入门指南](docs/zh-CN/getting-started/)
|
|
154
|
+
|
|
155
|
+
## 应用场景
|
|
156
|
+
|
|
157
|
+
- **多平台机器人** - 在多个平台部署相同功能的机器人
|
|
158
|
+
- **聊天助手** - 接入 AI 聊天模块,实现娱乐和交互
|
|
159
|
+
- **自动化工具** - 消息通知、任务管理、数据收集
|
|
160
|
+
- **消息转发** - 跨平台消息同步和转发
|
|
161
|
+
|
|
162
|
+
## 支持的适配器
|
|
163
|
+
|
|
164
|
+
欢迎您贡献适配器!
|
|
165
|
+
|
|
166
|
+
| 适配器 | 说明 |
|
|
167
|
+
|--------|------|
|
|
168
|
+
| [云湖](https://github.com/ErisPulse/ErisPulse-YunhuAdapter) | 企业级即时通讯平台(机器人账户) |
|
|
169
|
+
| [云湖用户](https://github.com/wsu2059q/ErisPulse-YunhuUserAdapter) | 基于云湖用户账户的适配器 |
|
|
170
|
+
| [Telegram](https://github.com/ErisPulse/ErisPulse-TelegramAdapter) | 全球性即时通讯软件 |
|
|
171
|
+
| [OneBot11](https://github.com/ErisPulse/ErisPulse-OneBot11Adapter) | 通用机器人接口标准 |
|
|
172
|
+
| [OneBot12](https://github.com/ErisPulse/ErisPulse-OneBot12Adapter) | OneBot12 标准 |
|
|
173
|
+
| [邮件](https://github.com/ErisPulse/ErisPulse-EmailAdapter) | 邮件收发处理 |
|
|
174
|
+
| [沙箱](https://github.com/ErisPulse/ErisPulse-SandboxAdapter) | 网页调试界面,无需接入实际平台 |
|
|
175
|
+
| [Kook](https://github.com/shanfishapp/ErisPulse-KookAdapter) | Kook(开黑啦)即时通讯平台 |
|
|
176
|
+
|
|
177
|
+
查看 [适配器详情介绍](docs/zh-CN/platform-guide/README.md)
|
|
178
|
+
|
|
179
|
+
## 文档资源
|
|
180
|
+
|
|
181
|
+
| 简体中文 | English | 繁體中文 |
|
|
182
|
+
|----------------|----------------|----------------|
|
|
183
|
+
| [文档入口](docs/zh-CN/README.md) | [Documentation](docs/en/README.md) | [文檔入口](docs/zh-TW/README.md) |
|
|
184
|
+
|
|
185
|
+
## 外部资源
|
|
186
|
+
|
|
187
|
+
| 平台 | 主站点 | 备用站点 |
|
|
188
|
+
|------|--------|---------|
|
|
189
|
+
| 文档 | [erisdev.com](https://www.erisdev.com/#docs) | [Cloudflare](https://erispulse.pages.dev/#docs) • [GitHub](https://erispulse.github.io/#docs) • [Netlify](https://erispulse.netlify.app/#docs) |
|
|
190
|
+
| 模块市场 | [erisdev.com](https://www.erisdev.com/#market) | [Cloudflare](https://erispulse.pages.dev/#market) • [GitHub](https://erispulse.github.io/#market) • [Netlify](https://erispulse.netlify.app/#market) |
|
|
191
|
+
|
|
192
|
+
## 贡献指南
|
|
193
|
+
|
|
194
|
+
ErisPulse 项目的健全性还需要您的一份力!我们欢迎各种形式的贡献,包括但不限于:
|
|
195
|
+
|
|
196
|
+
1. **报告问题**
|
|
197
|
+
在 [GitHub Issues](https://github.com/ErisPulse/ErisPulse/issues) 提交 bug 报告
|
|
198
|
+
|
|
199
|
+
2. **功能请求**
|
|
200
|
+
通过 [社区讨论](https://github.com/ErisPulse/ErisPulse/discussions) 提出新想法
|
|
201
|
+
|
|
202
|
+
3. **代码贡献**
|
|
203
|
+
提交 Pull Request 前请阅读我们的 [代码风格](docs/zh-CN/styleguide/) 以及 [贡献指南](CONTRIBUTING.md)
|
|
204
|
+
|
|
205
|
+
4. **文档改进**
|
|
206
|
+
帮助完善文档和示例代码
|
|
207
|
+
|
|
208
|
+
[加入社区讨论](https://github.com/ErisPulse/ErisPulse/discussions)
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 致谢
|
|
213
|
+
|
|
214
|
+
- 本项目部分代码基于 [sdkFrame](https://github.com/runoneall/sdkFrame)
|
|
215
|
+
- 核心适配器标准化层基于 [OneBot12 规范](https://12.onebot.dev/)
|
|
216
|
+
- 感谢所有为开源社区做出贡献的开发者和作者
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ErisPulse"
|
|
7
|
-
version = "2.4.
|
|
7
|
+
version = "2.4.2-dev.0"
|
|
8
8
|
description = "ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -66,6 +66,8 @@ test = [
|
|
|
66
66
|
"pytest-asyncio>=0.21.0",
|
|
67
67
|
"pytest-xdist>=3.0.0",
|
|
68
68
|
"pytest-mock>=3.10.0",
|
|
69
|
+
"pytest-benchmark>=4.0.0",
|
|
70
|
+
"httpx>=0.24.0",
|
|
69
71
|
]
|
|
70
72
|
dev = [
|
|
71
73
|
"pytest>=7.0.0",
|
|
@@ -73,6 +75,8 @@ dev = [
|
|
|
73
75
|
"pytest-asyncio>=0.21.0",
|
|
74
76
|
"pytest-xdist>=3.0.0",
|
|
75
77
|
"pytest-mock>=3.10.0",
|
|
78
|
+
"pytest-benchmark>=4.0.0",
|
|
79
|
+
"httpx>=0.24.0",
|
|
76
80
|
"pyclean>=3.6.0",
|
|
77
81
|
"ruff>=0.1.7",
|
|
78
82
|
]
|
|
@@ -6,9 +6,6 @@ ErisPulse 命令行接口主入口
|
|
|
6
6
|
|
|
7
7
|
import sys
|
|
8
8
|
import importlib
|
|
9
|
-
import importlib.metadata
|
|
10
|
-
import asyncio
|
|
11
|
-
import inspect
|
|
12
9
|
import traceback
|
|
13
10
|
import pkgutil
|
|
14
11
|
from argparse import ArgumentParser, RawDescriptionHelpFormatter
|
|
@@ -24,7 +21,7 @@ class CLI:
|
|
|
24
21
|
"""
|
|
25
22
|
ErisPulse 命令行接口主类
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
提供完整的命令行交互功能
|
|
28
25
|
"""
|
|
29
26
|
|
|
30
27
|
def __init__(self):
|
|
@@ -32,7 +29,6 @@ class CLI:
|
|
|
32
29
|
self.registry = CommandRegistry()
|
|
33
30
|
self.parser = self._create_parser()
|
|
34
31
|
self._register_builtin_commands()
|
|
35
|
-
self._load_external_commands()
|
|
36
32
|
|
|
37
33
|
def _create_parser(self) -> ArgumentParser:
|
|
38
34
|
"""
|
|
@@ -128,30 +124,6 @@ class CLI:
|
|
|
128
124
|
)
|
|
129
125
|
command.add_arguments(parser)
|
|
130
126
|
|
|
131
|
-
def _load_external_commands(self):
|
|
132
|
-
"""
|
|
133
|
-
加载第三方 CLI 命令
|
|
134
|
-
"""
|
|
135
|
-
try:
|
|
136
|
-
entry_points = importlib.metadata.entry_points()
|
|
137
|
-
if hasattr(entry_points, 'select'):
|
|
138
|
-
cli_entries = entry_points.select(group='erispulse.cli')
|
|
139
|
-
else:
|
|
140
|
-
cli_entries = entry_points.get('erispulse.cli', [])
|
|
141
|
-
|
|
142
|
-
for entry in cli_entries:
|
|
143
|
-
try:
|
|
144
|
-
cli_func = entry.load()
|
|
145
|
-
if callable(cli_func):
|
|
146
|
-
# 传入 subparsers 和 console,保持兼容性
|
|
147
|
-
cli_func(self.subparsers, console)
|
|
148
|
-
else:
|
|
149
|
-
console.print(f"[warning]模块 {entry.name} 的入口点不是可调用对象[/]")
|
|
150
|
-
except Exception as e:
|
|
151
|
-
console.print(f"[error]加载第三方命令 {entry.name} 失败: {e}[/]")
|
|
152
|
-
except Exception as e:
|
|
153
|
-
console.print(f"[warning]加载第三方CLI命令失败: {e}[/]")
|
|
154
|
-
|
|
155
127
|
def _print_version(self):
|
|
156
128
|
"""打印版本信息"""
|
|
157
129
|
from ErisPulse import __version__
|
|
@@ -192,8 +164,9 @@ class CLI:
|
|
|
192
164
|
if command:
|
|
193
165
|
command.execute(args)
|
|
194
166
|
else:
|
|
195
|
-
|
|
196
|
-
self.
|
|
167
|
+
console.print(f"[error]未知命令: {args.command}[/]")
|
|
168
|
+
self.parser.print_help()
|
|
169
|
+
sys.exit(1)
|
|
197
170
|
|
|
198
171
|
except KeyboardInterrupt:
|
|
199
172
|
console.print("\n[warning]操作被用户中断[/]")
|
|
@@ -203,29 +176,3 @@ class CLI:
|
|
|
203
176
|
if args.verbose >= 1:
|
|
204
177
|
console.print(traceback.format_exc())
|
|
205
178
|
sys.exit(1)
|
|
206
|
-
|
|
207
|
-
def _execute_external_command(self, args):
|
|
208
|
-
"""
|
|
209
|
-
执行第三方命令
|
|
210
|
-
|
|
211
|
-
:param args: 解析后的参数
|
|
212
|
-
"""
|
|
213
|
-
try:
|
|
214
|
-
# 第三方命令在注册时已经通过 set_defaults(func=handle_command) 设置了处理函数
|
|
215
|
-
# 所以 args.func 就是处理函数
|
|
216
|
-
if hasattr(args, 'func') and args.func:
|
|
217
|
-
handler_func = args.func
|
|
218
|
-
if inspect.iscoroutinefunction(handler_func):
|
|
219
|
-
# 异步函数:使用 asyncio.run() 运行
|
|
220
|
-
asyncio.run(handler_func(args))
|
|
221
|
-
else:
|
|
222
|
-
# 同步函数:直接调用
|
|
223
|
-
handler_func(args)
|
|
224
|
-
else:
|
|
225
|
-
console.print(f"[error]命令 {args.command} 没有处理函数[/]")
|
|
226
|
-
sys.exit(1)
|
|
227
|
-
except Exception as e:
|
|
228
|
-
console.print(f"[error]执行第三方命令失败: {e}[/]")
|
|
229
|
-
if args.verbose >= 1:
|
|
230
|
-
console.print(traceback.format_exc())
|
|
231
|
-
sys.exit(1)
|