ErisPulse 1.1.0__tar.gz → 1.1.1__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.
@@ -16,6 +16,7 @@ class EnvManager:
16
16
  def __init__(self):
17
17
  if not hasattr(self, "_initialized"):
18
18
  self._init_db()
19
+ self._create_env_file_if_not_exists()
19
20
  self._initialized = True
20
21
 
21
22
  def _init_db(self):
@@ -89,6 +90,34 @@ class EnvManager:
89
90
  if not key.startswith("__") and isinstance(value, (dict, list, str, int, float, bool)):
90
91
  self.set(key, value)
91
92
 
93
+ def _create_env_file_if_not_exists(self):
94
+ env_file = Path("env.py")
95
+ if not env_file.exists():
96
+ content = '''# env.py
97
+ # ErisPulse 环境配置文件
98
+ # 本文件由 SDK 自动创建,请勿随意删除
99
+ # 配置项可通过 sdk.env.get(key, default) 获取,或使用 sdk.env.set(key, value) 设置
100
+ # 你也可以像写普通变量一样直接定义配置项,例如:
101
+ #
102
+ # MY_CONFIG = "value"
103
+ # MY_CONFIG_2 = {"key": "value"}
104
+ # MY_CONFIG_3 = [1, 2, 3]
105
+ #
106
+ # sdk.env.set("MY_CONFIG", "value")
107
+ # sdk.env.set("MY_CONFIG_2", {"key": "value"})
108
+ # sdk.env.set("MY_CONFIG_3", [1, 2, 3])
109
+ #
110
+ # 这些变量会自动被加载到 SDK 的配置系统中,可通过 sdk.env.MY_CONFIG 或 sdk.env.get("MY_CONFIG") 访问。
111
+
112
+ from ErisPulse import sdk
113
+ '''
114
+ try:
115
+ with open(env_file, "w", encoding="utf-8") as f:
116
+ f.write(content)
117
+ self.logger.info("已自动生成 env.py 文件")
118
+ except Exception as e:
119
+ self.logger.error(f"无法创建 env.py 文件: {e}")
120
+
92
121
  def __getattr__(self, key):
93
122
  try:
94
123
  return self.get(key)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ErisPulse
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
5
5
  Author-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com>, runoneall <runoobsteve@gmail.com>
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -55,17 +55,13 @@ if __name__ == "__main__":
55
55
  ```
56
56
 
57
57
  ## 导航
58
- - [开发指南](docs/DEVELOPMENT.md) - 完整的开发文档
59
- - [命令行工具](docs/CLI.md) - CLI 使用手册
60
- - [源配置指南](docs/ORIGIN.md) - 模块源配置说明
61
- - [更新日志](docs/CHANGELOG.md) - 版本更新历史
62
- - [底层API](docs/REFERENCE.md) - 方法与接口
63
- - [GitHub Discussions](https://github.com/ErisPulse/ErisPulse/discussions)
58
+ - [开发者指南](docs/DEVELOPMENT.md)
59
+ - [底层方法与接口](docs/REFERENCE.md)
60
+ - [命令行工具](docs/CLI.md)
61
+ - [源配置指南](docs/ORIGIN.md)
62
+ - [更新日志](docs/CHANGELOG.md)
63
+ > [GitHub 社区](https://github.com/ErisPulse/ErisPulse/discussions)
64
64
 
65
65
  ## 🤝 贡献
66
66
 
67
67
  欢迎任何形式的贡献!无论是报告 bug、提出新功能请求,还是直接提交代码,都非常感谢。
68
-
69
- ## 📄 许可证
70
-
71
- 本项目采用 [MIT 许可证](LICENSE)。
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ErisPulse
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
5
5
  Author-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com>, runoneall <runoobsteve@gmail.com>
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -55,17 +55,13 @@ if __name__ == "__main__":
55
55
  ```
56
56
 
57
57
  ## 导航
58
- - [开发指南](docs/DEVELOPMENT.md) - 完整的开发文档
59
- - [命令行工具](docs/CLI.md) - CLI 使用手册
60
- - [源配置指南](docs/ORIGIN.md) - 模块源配置说明
61
- - [更新日志](docs/CHANGELOG.md) - 版本更新历史
62
- - [底层API](docs/REFERENCE.md) - 方法与接口
63
- - [GitHub Discussions](https://github.com/ErisPulse/ErisPulse/discussions)
58
+ - [开发者指南](docs/DEVELOPMENT.md)
59
+ - [底层方法与接口](docs/REFERENCE.md)
60
+ - [命令行工具](docs/CLI.md)
61
+ - [源配置指南](docs/ORIGIN.md)
62
+ - [更新日志](docs/CHANGELOG.md)
63
+ > [GitHub 社区](https://github.com/ErisPulse/ErisPulse/discussions)
64
64
 
65
65
  ## 🤝 贡献
66
66
 
67
67
  欢迎任何形式的贡献!无论是报告 bug、提出新功能请求,还是直接提交代码,都非常感谢。
68
-
69
- ## 📄 许可证
70
-
71
- 本项目采用 [MIT 许可证](LICENSE)。
@@ -1,49 +1,45 @@
1
- ![](./.github/assets/erispulse_logo.png)
2
-
3
- 基于 [RyhBotPythonSDK V2](https://github.com/runoneall/RyhBotPythonSDK2) 构建,由 [sdkFrame](https://github.com/runoneall/sdkFrame) 提供支持的异步机器人开发框架。
4
-
5
- ## ✨ 核心特性
6
- - ⚡ 完全异步架构设计(async/await)
7
- - 🧩 模块化插件系统
8
- - 📜 内置日志系统
9
- - 🛑 统一的错误管理
10
- - 🛠️ 灵活的配置管理
11
-
12
- ## 📦 安装
13
-
14
- ```bash
15
- pip install ErisPulse --upgrade
16
- ```
17
-
18
- **要求**:Python ≥ 3.7,pip ≥ 20.0
19
-
20
- ## 🚀 快速开始
21
-
22
- ```python
23
- import asyncio
24
- from ErisPulse import sdk, logger
25
-
26
- async def main():
27
- sdk.init()
28
- logger.info("ErisPulse 已启动")
29
- # 这里可以添加自定义逻辑 | 如模块的 AddHandle,AddTrigger 等
30
-
31
- if __name__ == "__main__":
32
- asyncio.run(main())
33
- ```
34
-
35
- ## 导航
36
- - [开发指南](docs/DEVELOPMENT.md) - 完整的开发文档
37
- - [命令行工具](docs/CLI.md) - CLI 使用手册
38
- - [源配置指南](docs/ORIGIN.md) - 模块源配置说明
39
- - [更新日志](docs/CHANGELOG.md) - 版本更新历史
40
- - [底层API](docs/REFERENCE.md) - 方法与接口
41
- - [GitHub Discussions](https://github.com/ErisPulse/ErisPulse/discussions)
42
-
43
- ## 🤝 贡献
44
-
45
- 欢迎任何形式的贡献!无论是报告 bug、提出新功能请求,还是直接提交代码,都非常感谢。
46
-
47
- ## 📄 许可证
48
-
49
- 本项目采用 [MIT 许可证](LICENSE)。
1
+ ![](./.github/assets/erispulse_logo.png)
2
+
3
+ 基于 [RyhBotPythonSDK V2](https://github.com/runoneall/RyhBotPythonSDK2) 构建,由 [sdkFrame](https://github.com/runoneall/sdkFrame) 提供支持的异步机器人开发框架。
4
+
5
+ ## ✨ 核心特性
6
+ - ⚡ 完全异步架构设计(async/await)
7
+ - 🧩 模块化插件系统
8
+ - 📜 内置日志系统
9
+ - 🛑 统一的错误管理
10
+ - 🛠️ 灵活的配置管理
11
+
12
+ ## 📦 安装
13
+
14
+ ```bash
15
+ pip install ErisPulse --upgrade
16
+ ```
17
+
18
+ **要求**:Python ≥ 3.7,pip ≥ 20.0
19
+
20
+ ## 🚀 快速开始
21
+
22
+ ```python
23
+ import asyncio
24
+ from ErisPulse import sdk, logger
25
+
26
+ async def main():
27
+ sdk.init()
28
+ logger.info("ErisPulse 已启动")
29
+ # 这里可以添加自定义逻辑 | 如模块的 AddHandle,AddTrigger 等
30
+
31
+ if __name__ == "__main__":
32
+ asyncio.run(main())
33
+ ```
34
+
35
+ ## 导航
36
+ - [开发者指南](docs/DEVELOPMENT.md)
37
+ - [底层方法与接口](docs/REFERENCE.md)
38
+ - [命令行工具](docs/CLI.md)
39
+ - [源配置指南](docs/ORIGIN.md)
40
+ - [更新日志](docs/CHANGELOG.md)
41
+ > [GitHub 社区](https://github.com/ErisPulse/ErisPulse/discussions)
42
+
43
+ ## 🤝 贡献
44
+
45
+ 欢迎任何形式的贡献!无论是报告 bug、提出新功能请求,还是直接提交代码,都非常感谢。
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ErisPulse"
3
- version = "1.1.0"
3
+ version = "1.1.1"
4
4
  authors = [
5
5
  { name = "艾莉丝·格雷拉特(WSu2059)", email = "wsu2059@qq.com" },
6
6
  { name = "runoneall", email = "runoobsteve@gmail.com" }
File without changes
File without changes
File without changes
File without changes