ErisPulse 1.0.13__py3-none-any.whl → 1.0.14.dev1__py3-none-any.whl

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/raiserr.py ADDED
@@ -0,0 +1,44 @@
1
+ import sys
2
+ import traceback
3
+
4
+ class Error:
5
+ def __init__(self):
6
+ self._types = {}
7
+
8
+ def register(self, name, doc="", base=Exception):
9
+ if name not in self._types:
10
+ err_cls = type(name, (base,), {"__doc__": doc})
11
+ self._types[name] = err_cls
12
+ return self._types[name]
13
+
14
+ def __getattr__(self, name):
15
+ def raiser(msg, exit=False):
16
+ from .logger import logger
17
+ err_cls = self._types.get(name) or self.register(name)
18
+ exc = err_cls(msg)
19
+ logger.error(f"{name}: {msg} | {err_cls.__doc__}")
20
+ logger.error("".join(traceback.format_stack()))
21
+ if exit:
22
+ raise exc
23
+ return raiser
24
+
25
+ def info(self, name: str = None):
26
+ result = {}
27
+ for err_name, err_cls in self._types.items():
28
+ result[err_name] = {
29
+ "type": err_name,
30
+ "doc": getattr(err_cls, "__doc__", ""),
31
+ "class": err_cls,
32
+ }
33
+ if name is None:
34
+ return result
35
+ err_cls = self._types.get(name)
36
+ if not err_cls:
37
+ return None
38
+ return {
39
+ "type": name,
40
+ "doc": getattr(err_cls, "__doc__", ""),
41
+ "class": err_cls,
42
+ }
43
+
44
+ raiserr = Error()
ErisPulse/util.py CHANGED
@@ -1,8 +1,6 @@
1
- from collections import defaultdict, deque
2
1
  import asyncio
3
- import os
4
- import shutil
5
2
  from concurrent.futures import ThreadPoolExecutor
3
+ from collections import defaultdict, deque
6
4
 
7
5
  executor = ThreadPoolExecutor()
8
6
 
@@ -1,96 +1,73 @@
1
- Metadata-Version: 2.4
2
- Name: ErisPulse
3
- Version: 1.0.13
4
- Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
5
- Home-page: https://github.com/wsu2059q/ErisPulse
6
- Author: 艾莉丝·格雷拉特(WSu2059)
7
- Author-email: wsu2059@qq.com
8
- Maintainer: runoneall
9
- Maintainer-email: runoobsteve@gmail.com
10
- License: MIT
11
- Classifier: Development Status :: 5 - Production/Stable
12
- Classifier: Intended Audience :: Developers
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.7
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Programming Language :: Python :: 3 :: Only
22
- Classifier: Operating System :: OS Independent
23
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
- Requires-Python: >=3.7
25
- Description-Content-Type: text/markdown
26
- Requires-Dist: aiohttp
27
- Requires-Dist: rich
28
- Requires-Dist: prompt_toolkit
29
- Dynamic: author
30
- Dynamic: author-email
31
- Dynamic: classifier
32
- Dynamic: description
33
- Dynamic: description-content-type
34
- Dynamic: home-page
35
- Dynamic: license
36
- Dynamic: maintainer
37
- Dynamic: maintainer-email
38
- Dynamic: requires-dist
39
- Dynamic: requires-python
40
- Dynamic: summary
41
-
42
- # 🚀 ErisPulse - 异步机器人开发框架
43
-
44
- 基于 [RyhBotPythonSDK V2](https://github.com/runoneall/RyhBotPythonSDK2) 构建,由 [sdkFrame](https://github.com/runoneall/sdkFrame) 提供支持的异步机器人开发框架。
45
-
46
- ## ✨ 核心特性
47
- - 完全异步架构设计
48
- - 模块化插件系统
49
- - 多协议支持
50
- - 模块热更新
51
- - 跨平台兼容
52
-
53
- ## 📦 安装
54
-
55
- ```bash
56
- pip install ErisPulse --upgrade
57
- ```
58
-
59
- **系统要求**:
60
- - Python 3.7
61
- - pip 20.0
62
-
63
- ## 🚀 快速开始
64
-
65
- ```python
66
- import asyncio
67
- from ErisPulse import sdk, logger
68
-
69
- async def main():
70
- sdk.init()
71
- logger.info("ErisPulse 已启动")
72
- # 这里可以添加自定义逻辑 | 如模块的 AddHandle,AddTrigger 等
73
-
74
- if __name__ == "__main__":
75
- asyncio.run(main())
76
- ```
77
-
78
- ## 🛠️ 常用命令
79
-
80
- ```bash
81
- epsdk update # 更新模块源
82
- epsdk install AIChat # 安装模块
83
- epsdk enable AIChat # 启用模块
84
- epsdk list # 查看所有模块
85
- ```
86
- 更多命令详见 [命令行工具文档](docs/CLI.md)。
87
-
88
- ## 🧩 模块开发
89
-
90
- 你可以通过实现自定义模块扩展 ErisPulse 功能。详见 [开发指南](docs/DEVELOPMENT.md)。
91
-
92
- ## 📖 文档导航
93
- - [开发指南](docs/DEVELOPMENT.md) - 完整的开发文档
94
- - [命令行工具](docs/CLI.md) - CLI 使用手册
95
- - [源配置指南](docs/ORIGIN.md) - 模块源配置说明
96
- - [更新日志](docs/CHANGELOG.md) - 版本更新历史
1
+ Metadata-Version: 2.4
2
+ Name: ErisPulse
3
+ Version: 1.0.14.dev1
4
+ Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
5
+ Author-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com>, runoneall <runoobsteve@gmail.com>
6
+ Classifier: Development Status :: 5 - Production/Stable
7
+ Classifier: Intended Audience :: Developers
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.7
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Requires-Python: >=3.7
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: aiohttp
22
+
23
+ 当前版本处于开发中,请谨慎使用。
24
+
25
+ ![](./.github/assets/erispulse_logo.png)
26
+
27
+ 基于 [RyhBotPythonSDK V2](https://github.com/runoneall/RyhBotPythonSDK2) 构建,由 [sdkFrame](https://github.com/runoneall/sdkFrame) 提供支持的异步机器人开发框架。
28
+
29
+ ## ✨ 核心特性
30
+ - ⚡ 完全异步架构设计(async/await)
31
+ - 🧩 模块化插件系统
32
+ - 📜 内置日志系统
33
+ - 🛑 统一的错误管理
34
+ - 🛠️ 灵活的配置管理
35
+
36
+ ## 📦 安装
37
+
38
+ ```bash
39
+ pip install ErisPulse --upgrade
40
+ ```
41
+
42
+ **要求**:Python 3.7,pip 20.0
43
+
44
+ ## 🚀 快速开始
45
+
46
+ ```python
47
+ import asyncio
48
+ from ErisPulse import sdk, logger
49
+
50
+ async def main():
51
+ sdk.init()
52
+ logger.info("ErisPulse 已启动")
53
+ # 这里可以添加自定义逻辑 | 如模块的 AddHandle,AddTrigger 等
54
+
55
+ if __name__ == "__main__":
56
+ asyncio.run(main())
57
+ ```
58
+
59
+ ## 导航
60
+ - [开发指南](docs/DEVELOPMENT.md) - 完整的开发文档
61
+ - [命令行工具](docs/CLI.md) - CLI 使用手册
62
+ - [源配置指南](docs/ORIGIN.md) - 模块源配置说明
63
+ - [更新日志](docs/CHANGELOG.md) - 版本更新历史
64
+ - [底层API](docs/REFERENCE.md) - 方法与接口
65
+ - [GitHub Discussions](https://github.com/ErisPulse/ErisPulse/discussions)
66
+
67
+ ## 🤝 贡献
68
+
69
+ 欢迎任何形式的贡献!无论是报告 bug、提出新功能请求,还是直接提交代码,都非常感谢。
70
+
71
+ ## 📄 许可证
72
+
73
+ 本项目采用 [MIT 许可证](LICENSE)。
@@ -0,0 +1,11 @@
1
+ ErisPulse/__init__.py,sha256=75SfkJEYHy73K3UGaEuMYlHtJadjpoNWd1yF-f5-aGc,6662
2
+ ErisPulse/__main__.py,sha256=1-mWPmZArG-o_eYxZiabmMs4MokQn_-TBa43R4_WYlc,32141
3
+ ErisPulse/db.py,sha256=2vBVFFEU-AcR-GkzWTqpn8fFV9EvuQee2mi1XzfDXVI,9077
4
+ ErisPulse/logger.py,sha256=AVjBuoF18Wu6mPMxB90i7Nge0IoMx2xPlTYrQX-UKaU,4973
5
+ ErisPulse/raiserr.py,sha256=WTMQEUbUSx4PS9_l9cEnuNuvm6zulgwQFipqVZZg3zc,1296
6
+ ErisPulse/util.py,sha256=90j71c32yP-s2zy1SM-1FExJRu7pWpkuPVQSXCaVTrg,1087
7
+ erispulse-1.0.14.dev1.dist-info/METADATA,sha256=132PK2kNWhBPBoQdx-9yf6wJV7RNQpksk3EjwMdAjOc,2502
8
+ erispulse-1.0.14.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ erispulse-1.0.14.dev1.dist-info/entry_points.txt,sha256=AjKvOdYR7QGXVpEJhjUYUwV2JluE4lm9vNbknC3hjOM,155
10
+ erispulse-1.0.14.dev1.dist-info/top_level.txt,sha256=Lm_qtkVvNJR8_dXh_qEDdl_12cZGpic-i4HUlVVUMZc,10
11
+ erispulse-1.0.14.dev1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
ErisPulse/errors.py DELETED
@@ -1,16 +0,0 @@
1
- class CycleDependencyError(Exception):
2
- def __init__(self, message):
3
- self.message = message
4
- super().__init__(self.message)
5
-
6
-
7
- class InvalidDependencyError(Exception):
8
- def __init__(self, message):
9
- self.message = message
10
- super().__init__(self.message)
11
-
12
-
13
- class InvalidModuleError(Exception):
14
- def __init__(self, message):
15
- self.message = message
16
- super().__init__(self.message)
@@ -1,11 +0,0 @@
1
- ErisPulse/__init__.py,sha256=dh9zmUfcxnMGBWZqrOaQf0cTL5tGur74JEu_X_y-7Ek,6445
2
- ErisPulse/__main__.py,sha256=s_SI3U9alSV2vHhHsVdvnA-lksBeFrXqowF5mXwYd_o,40295
3
- ErisPulse/envManager.py,sha256=xUtzP8CWT0KnyyYE8Fm_5UB2VsMi1ODLHMKUoGCWwO4,9304
4
- ErisPulse/errors.py,sha256=DwIQ2nx3GyxSY0ogoeezTSP11MwSVFeR1tx7obkP9Rs,430
5
- ErisPulse/logger.py,sha256=Axlne7pLIsx1baq__37_rn_GGwlz8d6Bet-nuUR0eEc,1419
6
- ErisPulse/util.py,sha256=6SawalGTS7y_TbTY8W6SMTIRN5Z2TgJoHZwQ8zaE_k0,1111
7
- erispulse-1.0.13.dist-info/METADATA,sha256=Rk6UQcjSbK_fOq31HFjdf5wbD7hrZMeXr8cCywrtOW8,2989
8
- erispulse-1.0.13.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
9
- erispulse-1.0.13.dist-info/entry_points.txt,sha256=AjKvOdYR7QGXVpEJhjUYUwV2JluE4lm9vNbknC3hjOM,155
10
- erispulse-1.0.13.dist-info/top_level.txt,sha256=Lm_qtkVvNJR8_dXh_qEDdl_12cZGpic-i4HUlVVUMZc,10
11
- erispulse-1.0.13.dist-info/RECORD,,