ErisPulse 1.0.9__py3-none-any.whl → 1.0.10__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/__init__.py +6 -5
- ErisPulse/envManager.py +211 -211
- {erispulse-1.0.9.dist-info → erispulse-1.0.10.dist-info}/METADATA +6 -1
- erispulse-1.0.10.dist-info/RECORD +13 -0
- erispulse-1.0.9.dist-info/RECORD +0 -13
- {erispulse-1.0.9.dist-info → erispulse-1.0.10.dist-info}/WHEEL +0 -0
- {erispulse-1.0.9.dist-info → erispulse-1.0.10.dist-info}/entry_points.txt +0 -0
- {erispulse-1.0.9.dist-info → erispulse-1.0.10.dist-info}/top_level.txt +0 -0
ErisPulse/__init__.py
CHANGED
|
@@ -64,17 +64,18 @@ def init():
|
|
|
64
64
|
|
|
65
65
|
optional_deps = moduleObj.moduleInfo.get("optional_dependencies", [])
|
|
66
66
|
available_optional_deps = []
|
|
67
|
-
|
|
68
67
|
for dep in optional_deps:
|
|
69
68
|
if isinstance(dep, list):
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
available_deps = [d for d in dep if d in TempModules]
|
|
70
|
+
if available_deps:
|
|
71
|
+
available_optional_deps.extend(available_deps)
|
|
72
72
|
elif dep in TempModules:
|
|
73
73
|
available_optional_deps.append(dep)
|
|
74
74
|
|
|
75
|
-
if
|
|
75
|
+
if available_optional_deps:
|
|
76
|
+
logger.info(f"模块 {module_name} 加载了部分可选依赖: {available_optional_deps}")
|
|
77
|
+
else:
|
|
76
78
|
logger.warning(f"模块 {module_name} 缺少所有可选依赖: {optional_deps}")
|
|
77
|
-
continue
|
|
78
79
|
|
|
79
80
|
sdkInstalledModuleNames.append(module_name)
|
|
80
81
|
except Exception as e:
|
ErisPulse/envManager.py
CHANGED
|
@@ -1,211 +1,211 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import json
|
|
3
|
-
import sqlite3
|
|
4
|
-
import importlib.util
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
class EnvManager:
|
|
8
|
-
_instance = None
|
|
9
|
-
db_path = os.path.join(os.path.dirname(__file__), "config.db")
|
|
10
|
-
|
|
11
|
-
def __new__(cls, *args, **kwargs):
|
|
12
|
-
if not cls._instance:
|
|
13
|
-
cls._instance = super().__new__(cls)
|
|
14
|
-
return cls._instance
|
|
15
|
-
|
|
16
|
-
def __init__(self):
|
|
17
|
-
if not hasattr(self, "_initialized"):
|
|
18
|
-
self._init_db()
|
|
19
|
-
|
|
20
|
-
def _init_db(self):
|
|
21
|
-
os.makedirs(os.path.dirname(self.db_path), exist_ok=True)
|
|
22
|
-
|
|
23
|
-
conn = sqlite3.connect(self.db_path)
|
|
24
|
-
cursor = conn.cursor()
|
|
25
|
-
cursor.execute("""
|
|
26
|
-
CREATE TABLE IF NOT EXISTS config (
|
|
27
|
-
key TEXT PRIMARY KEY,
|
|
28
|
-
value TEXT NOT NULL
|
|
29
|
-
)
|
|
30
|
-
""")
|
|
31
|
-
cursor.execute("""
|
|
32
|
-
CREATE TABLE IF NOT EXISTS modules (
|
|
33
|
-
module_name TEXT PRIMARY KEY,
|
|
34
|
-
status INTEGER NOT NULL,
|
|
35
|
-
version TEXT,
|
|
36
|
-
description TEXT,
|
|
37
|
-
author TEXT,
|
|
38
|
-
dependencies TEXT,
|
|
39
|
-
optional_dependencies TEXT,
|
|
40
|
-
pip_dependencies TEXT
|
|
41
|
-
)
|
|
42
|
-
""")
|
|
43
|
-
conn.commit()
|
|
44
|
-
conn.close()
|
|
45
|
-
|
|
46
|
-
def get(self, key, default=None):
|
|
47
|
-
try:
|
|
48
|
-
with sqlite3.connect(self.db_path) as conn:
|
|
49
|
-
cursor = conn.cursor()
|
|
50
|
-
cursor.execute("SELECT value FROM config WHERE key = ?", (key,))
|
|
51
|
-
result = cursor.fetchone()
|
|
52
|
-
if result:
|
|
53
|
-
try:
|
|
54
|
-
return json.loads(result[0])
|
|
55
|
-
except json.JSONDecodeError:
|
|
56
|
-
return result[0]
|
|
57
|
-
return default
|
|
58
|
-
except sqlite3.OperationalError as e:
|
|
59
|
-
if "no such table" in str(e):
|
|
60
|
-
self._init_db()
|
|
61
|
-
return self.get(key, default)
|
|
62
|
-
else:
|
|
63
|
-
raise
|
|
64
|
-
|
|
65
|
-
def set(self, key, value):
|
|
66
|
-
serialized_value = json.dumps(value) if isinstance(value, (dict, list)) else str(value)
|
|
67
|
-
conn = sqlite3.connect(self.db_path)
|
|
68
|
-
cursor = conn.cursor()
|
|
69
|
-
cursor.execute("INSERT OR REPLACE INTO config (key, value) VALUES (?, ?)", (key, serialized_value))
|
|
70
|
-
conn.commit()
|
|
71
|
-
conn.close()
|
|
72
|
-
|
|
73
|
-
def delete(self, key):
|
|
74
|
-
conn = sqlite3.connect(self.db_path)
|
|
75
|
-
cursor = conn.cursor()
|
|
76
|
-
cursor.execute("DELETE FROM config WHERE key = ?", (key,))
|
|
77
|
-
conn.commit()
|
|
78
|
-
conn.close()
|
|
79
|
-
|
|
80
|
-
def clear(self):
|
|
81
|
-
conn = sqlite3.connect(self.db_path)
|
|
82
|
-
cursor = conn.cursor()
|
|
83
|
-
cursor.execute("DELETE FROM config")
|
|
84
|
-
conn.commit()
|
|
85
|
-
conn.close()
|
|
86
|
-
|
|
87
|
-
def load_env_file(self):
|
|
88
|
-
env_file = Path("env.py")
|
|
89
|
-
if env_file.exists():
|
|
90
|
-
spec = importlib.util.spec_from_file_location("env_module", env_file)
|
|
91
|
-
env_module = importlib.util.module_from_spec(spec)
|
|
92
|
-
spec.loader.exec_module(env_module)
|
|
93
|
-
for key, value in vars(env_module).items():
|
|
94
|
-
if not key.startswith("__") and isinstance(value, (dict, list, str, int, float, bool)):
|
|
95
|
-
self.set(key, value)
|
|
96
|
-
def set_module_status(self, module_name, status):
|
|
97
|
-
with sqlite3.connect(self.db_path) as conn:
|
|
98
|
-
cursor = conn.cursor()
|
|
99
|
-
cursor.execute("""
|
|
100
|
-
UPDATE modules SET status = ? WHERE module_name = ?
|
|
101
|
-
""", (int(status), module_name))
|
|
102
|
-
conn.commit()
|
|
103
|
-
|
|
104
|
-
def get_module_status(self, module_name):
|
|
105
|
-
with sqlite3.connect(self.db_path) as conn:
|
|
106
|
-
cursor = conn.cursor()
|
|
107
|
-
cursor.execute("""
|
|
108
|
-
SELECT status FROM modules WHERE module_name = ?
|
|
109
|
-
""", (module_name,))
|
|
110
|
-
result = cursor.fetchone()
|
|
111
|
-
return bool(result[0]) if result else True
|
|
112
|
-
|
|
113
|
-
def set_all_modules(self, modules_info):
|
|
114
|
-
with sqlite3.connect(self.db_path) as conn:
|
|
115
|
-
cursor = conn.cursor()
|
|
116
|
-
for module_name, module_info in modules_info.items():
|
|
117
|
-
cursor.execute("""
|
|
118
|
-
INSERT OR REPLACE INTO modules (
|
|
119
|
-
module_name, status, version, description, author,
|
|
120
|
-
dependencies, optional_dependencies, pip_dependencies
|
|
121
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
122
|
-
""", (
|
|
123
|
-
module_name,
|
|
124
|
-
int(module_info.get('status', True)),
|
|
125
|
-
module_info.get('info', {}).get('version', ''),
|
|
126
|
-
module_info.get('info', {}).get('description', ''),
|
|
127
|
-
module_info.get('info', {}).get('author', ''),
|
|
128
|
-
json.dumps(module_info.get('info', {}).get('dependencies', [])),
|
|
129
|
-
json.dumps(module_info.get('info', {}).get('optional_dependencies', [])),
|
|
130
|
-
json.dumps(module_info.get('info', {}).get('pip_dependencies', []))
|
|
131
|
-
))
|
|
132
|
-
conn.commit()
|
|
133
|
-
|
|
134
|
-
def get_all_modules(self):
|
|
135
|
-
with sqlite3.connect(self.db_path) as conn:
|
|
136
|
-
cursor = conn.cursor()
|
|
137
|
-
cursor.execute("SELECT * FROM modules")
|
|
138
|
-
rows = cursor.fetchall()
|
|
139
|
-
modules_info = {}
|
|
140
|
-
for row in rows:
|
|
141
|
-
module_name, status, version, description, author, dependencies, optional_dependencies, pip_dependencies = row
|
|
142
|
-
modules_info[module_name] = {
|
|
143
|
-
'status': bool(status),
|
|
144
|
-
'info': {
|
|
145
|
-
'version': version,
|
|
146
|
-
'description': description,
|
|
147
|
-
'author': author,
|
|
148
|
-
'dependencies': json.loads(dependencies) if dependencies else [],
|
|
149
|
-
'optional_dependencies': json.loads(optional_dependencies) if optional_dependencies else [],
|
|
150
|
-
'pip_dependencies': json.loads(pip_dependencies) if pip_dependencies else []
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return modules_info
|
|
154
|
-
|
|
155
|
-
def get_module(self, module_name):
|
|
156
|
-
with sqlite3.connect(self.db_path) as conn:
|
|
157
|
-
cursor = conn.cursor()
|
|
158
|
-
cursor.execute("SELECT * FROM modules WHERE module_name = ?", (module_name,))
|
|
159
|
-
row = cursor.fetchone()
|
|
160
|
-
if row:
|
|
161
|
-
module_name, status, version, description, author, dependencies, optional_dependencies, pip_dependencies = row
|
|
162
|
-
return {
|
|
163
|
-
'status': bool(status),
|
|
164
|
-
'info': {
|
|
165
|
-
'version': version,
|
|
166
|
-
'description': description,
|
|
167
|
-
'author': author,
|
|
168
|
-
'dependencies': json.loads(dependencies) if dependencies else [],
|
|
169
|
-
'optional_dependencies': json.loads(optional_dependencies) if optional_dependencies else [],
|
|
170
|
-
'pip_dependencies': json.loads(pip_dependencies) if pip_dependencies else []
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return None
|
|
174
|
-
|
|
175
|
-
def set_module(self, module_name, module_info):
|
|
176
|
-
with sqlite3.connect(self.db_path) as conn:
|
|
177
|
-
cursor = conn.cursor()
|
|
178
|
-
cursor.execute("""
|
|
179
|
-
INSERT OR REPLACE INTO modules (
|
|
180
|
-
module_name, status, version, description, author,
|
|
181
|
-
dependencies, optional_dependencies, pip_dependencies
|
|
182
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
183
|
-
""", (
|
|
184
|
-
module_name,
|
|
185
|
-
int(module_info.get('status', True)),
|
|
186
|
-
module_info.get('info', {}).get('version', ''),
|
|
187
|
-
module_info.get('info', {}).get('description', ''),
|
|
188
|
-
module_info.get('info', {}).get('author', ''),
|
|
189
|
-
json.dumps(module_info.get('info', {}).get('dependencies', [])),
|
|
190
|
-
json.dumps(module_info.get('info', {}).get('optional_dependencies', [])),
|
|
191
|
-
json.dumps(module_info.get('info', {}).get('pip_dependencies', []))
|
|
192
|
-
))
|
|
193
|
-
conn.commit()
|
|
194
|
-
|
|
195
|
-
def update_module(self, module_name, module_info):
|
|
196
|
-
self.set_module(module_name, module_info)
|
|
197
|
-
|
|
198
|
-
def remove_module(self, module_name):
|
|
199
|
-
with sqlite3.connect(self.db_path) as conn:
|
|
200
|
-
cursor = conn.cursor()
|
|
201
|
-
cursor.execute("DELETE FROM modules WHERE module_name = ?", (module_name,))
|
|
202
|
-
conn.commit()
|
|
203
|
-
return cursor.rowcount > 0
|
|
204
|
-
|
|
205
|
-
def __getattr__(self, key):
|
|
206
|
-
try:
|
|
207
|
-
return self.get(key)
|
|
208
|
-
except KeyError:
|
|
209
|
-
raise AttributeError(f"配置项 {key} 不存在")
|
|
210
|
-
|
|
211
|
-
env = EnvManager()
|
|
1
|
+
import os
|
|
2
|
+
import json
|
|
3
|
+
import sqlite3
|
|
4
|
+
import importlib.util
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
class EnvManager:
|
|
8
|
+
_instance = None
|
|
9
|
+
db_path = os.path.join(os.path.dirname(__file__), "config.db")
|
|
10
|
+
|
|
11
|
+
def __new__(cls, *args, **kwargs):
|
|
12
|
+
if not cls._instance:
|
|
13
|
+
cls._instance = super().__new__(cls)
|
|
14
|
+
return cls._instance
|
|
15
|
+
|
|
16
|
+
def __init__(self):
|
|
17
|
+
if not hasattr(self, "_initialized"):
|
|
18
|
+
self._init_db()
|
|
19
|
+
|
|
20
|
+
def _init_db(self):
|
|
21
|
+
os.makedirs(os.path.dirname(self.db_path), exist_ok=True)
|
|
22
|
+
|
|
23
|
+
conn = sqlite3.connect(self.db_path)
|
|
24
|
+
cursor = conn.cursor()
|
|
25
|
+
cursor.execute("""
|
|
26
|
+
CREATE TABLE IF NOT EXISTS config (
|
|
27
|
+
key TEXT PRIMARY KEY,
|
|
28
|
+
value TEXT NOT NULL
|
|
29
|
+
)
|
|
30
|
+
""")
|
|
31
|
+
cursor.execute("""
|
|
32
|
+
CREATE TABLE IF NOT EXISTS modules (
|
|
33
|
+
module_name TEXT PRIMARY KEY,
|
|
34
|
+
status INTEGER NOT NULL,
|
|
35
|
+
version TEXT,
|
|
36
|
+
description TEXT,
|
|
37
|
+
author TEXT,
|
|
38
|
+
dependencies TEXT,
|
|
39
|
+
optional_dependencies TEXT,
|
|
40
|
+
pip_dependencies TEXT
|
|
41
|
+
)
|
|
42
|
+
""")
|
|
43
|
+
conn.commit()
|
|
44
|
+
conn.close()
|
|
45
|
+
|
|
46
|
+
def get(self, key, default=None):
|
|
47
|
+
try:
|
|
48
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
49
|
+
cursor = conn.cursor()
|
|
50
|
+
cursor.execute("SELECT value FROM config WHERE key = ?", (key,))
|
|
51
|
+
result = cursor.fetchone()
|
|
52
|
+
if result:
|
|
53
|
+
try:
|
|
54
|
+
return json.loads(result[0])
|
|
55
|
+
except json.JSONDecodeError:
|
|
56
|
+
return result[0]
|
|
57
|
+
return default
|
|
58
|
+
except sqlite3.OperationalError as e:
|
|
59
|
+
if "no such table" in str(e):
|
|
60
|
+
self._init_db()
|
|
61
|
+
return self.get(key, default)
|
|
62
|
+
else:
|
|
63
|
+
raise
|
|
64
|
+
|
|
65
|
+
def set(self, key, value):
|
|
66
|
+
serialized_value = json.dumps(value) if isinstance(value, (dict, list)) else str(value)
|
|
67
|
+
conn = sqlite3.connect(self.db_path)
|
|
68
|
+
cursor = conn.cursor()
|
|
69
|
+
cursor.execute("INSERT OR REPLACE INTO config (key, value) VALUES (?, ?)", (key, serialized_value))
|
|
70
|
+
conn.commit()
|
|
71
|
+
conn.close()
|
|
72
|
+
|
|
73
|
+
def delete(self, key):
|
|
74
|
+
conn = sqlite3.connect(self.db_path)
|
|
75
|
+
cursor = conn.cursor()
|
|
76
|
+
cursor.execute("DELETE FROM config WHERE key = ?", (key,))
|
|
77
|
+
conn.commit()
|
|
78
|
+
conn.close()
|
|
79
|
+
|
|
80
|
+
def clear(self):
|
|
81
|
+
conn = sqlite3.connect(self.db_path)
|
|
82
|
+
cursor = conn.cursor()
|
|
83
|
+
cursor.execute("DELETE FROM config")
|
|
84
|
+
conn.commit()
|
|
85
|
+
conn.close()
|
|
86
|
+
|
|
87
|
+
def load_env_file(self):
|
|
88
|
+
env_file = Path("env.py")
|
|
89
|
+
if env_file.exists():
|
|
90
|
+
spec = importlib.util.spec_from_file_location("env_module", env_file)
|
|
91
|
+
env_module = importlib.util.module_from_spec(spec)
|
|
92
|
+
spec.loader.exec_module(env_module)
|
|
93
|
+
for key, value in vars(env_module).items():
|
|
94
|
+
if not key.startswith("__") and isinstance(value, (dict, list, str, int, float, bool)):
|
|
95
|
+
self.set(key, value)
|
|
96
|
+
def set_module_status(self, module_name, status):
|
|
97
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
98
|
+
cursor = conn.cursor()
|
|
99
|
+
cursor.execute("""
|
|
100
|
+
UPDATE modules SET status = ? WHERE module_name = ?
|
|
101
|
+
""", (int(status), module_name))
|
|
102
|
+
conn.commit()
|
|
103
|
+
|
|
104
|
+
def get_module_status(self, module_name):
|
|
105
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
106
|
+
cursor = conn.cursor()
|
|
107
|
+
cursor.execute("""
|
|
108
|
+
SELECT status FROM modules WHERE module_name = ?
|
|
109
|
+
""", (module_name,))
|
|
110
|
+
result = cursor.fetchone()
|
|
111
|
+
return bool(result[0]) if result else True
|
|
112
|
+
|
|
113
|
+
def set_all_modules(self, modules_info):
|
|
114
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
115
|
+
cursor = conn.cursor()
|
|
116
|
+
for module_name, module_info in modules_info.items():
|
|
117
|
+
cursor.execute("""
|
|
118
|
+
INSERT OR REPLACE INTO modules (
|
|
119
|
+
module_name, status, version, description, author,
|
|
120
|
+
dependencies, optional_dependencies, pip_dependencies
|
|
121
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
122
|
+
""", (
|
|
123
|
+
module_name,
|
|
124
|
+
int(module_info.get('status', True)),
|
|
125
|
+
module_info.get('info', {}).get('version', ''),
|
|
126
|
+
module_info.get('info', {}).get('description', ''),
|
|
127
|
+
module_info.get('info', {}).get('author', ''),
|
|
128
|
+
json.dumps(module_info.get('info', {}).get('dependencies', [])),
|
|
129
|
+
json.dumps(module_info.get('info', {}).get('optional_dependencies', [])),
|
|
130
|
+
json.dumps(module_info.get('info', {}).get('pip_dependencies', []))
|
|
131
|
+
))
|
|
132
|
+
conn.commit()
|
|
133
|
+
|
|
134
|
+
def get_all_modules(self):
|
|
135
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
136
|
+
cursor = conn.cursor()
|
|
137
|
+
cursor.execute("SELECT * FROM modules")
|
|
138
|
+
rows = cursor.fetchall()
|
|
139
|
+
modules_info = {}
|
|
140
|
+
for row in rows:
|
|
141
|
+
module_name, status, version, description, author, dependencies, optional_dependencies, pip_dependencies = row
|
|
142
|
+
modules_info[module_name] = {
|
|
143
|
+
'status': bool(status),
|
|
144
|
+
'info': {
|
|
145
|
+
'version': version,
|
|
146
|
+
'description': description,
|
|
147
|
+
'author': author,
|
|
148
|
+
'dependencies': json.loads(dependencies) if dependencies else [],
|
|
149
|
+
'optional_dependencies': json.loads(optional_dependencies) if optional_dependencies else [],
|
|
150
|
+
'pip_dependencies': json.loads(pip_dependencies) if pip_dependencies else []
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return modules_info
|
|
154
|
+
|
|
155
|
+
def get_module(self, module_name):
|
|
156
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
157
|
+
cursor = conn.cursor()
|
|
158
|
+
cursor.execute("SELECT * FROM modules WHERE module_name = ?", (module_name,))
|
|
159
|
+
row = cursor.fetchone()
|
|
160
|
+
if row:
|
|
161
|
+
module_name, status, version, description, author, dependencies, optional_dependencies, pip_dependencies = row
|
|
162
|
+
return {
|
|
163
|
+
'status': bool(status),
|
|
164
|
+
'info': {
|
|
165
|
+
'version': version,
|
|
166
|
+
'description': description,
|
|
167
|
+
'author': author,
|
|
168
|
+
'dependencies': json.loads(dependencies) if dependencies else [],
|
|
169
|
+
'optional_dependencies': json.loads(optional_dependencies) if optional_dependencies else [],
|
|
170
|
+
'pip_dependencies': json.loads(pip_dependencies) if pip_dependencies else []
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return None
|
|
174
|
+
|
|
175
|
+
def set_module(self, module_name, module_info):
|
|
176
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
177
|
+
cursor = conn.cursor()
|
|
178
|
+
cursor.execute("""
|
|
179
|
+
INSERT OR REPLACE INTO modules (
|
|
180
|
+
module_name, status, version, description, author,
|
|
181
|
+
dependencies, optional_dependencies, pip_dependencies
|
|
182
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
183
|
+
""", (
|
|
184
|
+
module_name,
|
|
185
|
+
int(module_info.get('status', True)),
|
|
186
|
+
module_info.get('info', {}).get('version', ''),
|
|
187
|
+
module_info.get('info', {}).get('description', ''),
|
|
188
|
+
module_info.get('info', {}).get('author', ''),
|
|
189
|
+
json.dumps(module_info.get('info', {}).get('dependencies', [])),
|
|
190
|
+
json.dumps(module_info.get('info', {}).get('optional_dependencies', [])),
|
|
191
|
+
json.dumps(module_info.get('info', {}).get('pip_dependencies', []))
|
|
192
|
+
))
|
|
193
|
+
conn.commit()
|
|
194
|
+
|
|
195
|
+
def update_module(self, module_name, module_info):
|
|
196
|
+
self.set_module(module_name, module_info)
|
|
197
|
+
|
|
198
|
+
def remove_module(self, module_name):
|
|
199
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
200
|
+
cursor = conn.cursor()
|
|
201
|
+
cursor.execute("DELETE FROM modules WHERE module_name = ?", (module_name,))
|
|
202
|
+
conn.commit()
|
|
203
|
+
return cursor.rowcount > 0
|
|
204
|
+
|
|
205
|
+
def __getattr__(self, key):
|
|
206
|
+
try:
|
|
207
|
+
return self.get(key)
|
|
208
|
+
except KeyError:
|
|
209
|
+
raise AttributeError(f"配置项 {key} 不存在")
|
|
210
|
+
|
|
211
|
+
env = EnvManager()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ErisPulse
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.10
|
|
4
4
|
Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
|
|
5
5
|
Home-page: https://github.com/wsu2059q/ErisPulse
|
|
6
6
|
Author: 艾莉丝·格雷拉特(WSu2059)
|
|
@@ -63,3 +63,8 @@ ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用
|
|
|
63
63
|
|
|
64
64
|
## 1.0.9
|
|
65
65
|
修复了部分命令行参数的错误
|
|
66
|
+
|
|
67
|
+
## 1.0.10
|
|
68
|
+
- 修复了模块加载逻辑中可选依赖未正确加载的问题。
|
|
69
|
+
- 增强了日志输出,便于调试模块加载过程。
|
|
70
|
+
- 改进了 `optional_dependencies` 的处理逻辑,支持部分依赖加载。
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
ErisPulse/__init__.py,sha256=UBy7DpjkcepqV5d88rWHS3NIj-v-upXfybWu8YU3HLU,5988
|
|
2
|
+
ErisPulse/__main__.py,sha256=4tD2owe494v2hFGWuycqcE3eAehlOfqOmicP8datu6M,32053
|
|
3
|
+
ErisPulse/envManager.py,sha256=5PXUibBpB61GwCAsHnsHXnPhXZtltxQB2m5wYG8GmLA,8712
|
|
4
|
+
ErisPulse/errors.py,sha256=DwIQ2nx3GyxSY0ogoeezTSP11MwSVFeR1tx7obkP9Rs,430
|
|
5
|
+
ErisPulse/logger.py,sha256=qOXrYVHZRZwNBhZJ0-rpVbOgtyH414ujHLFqJ49aPtM,1934
|
|
6
|
+
ErisPulse/origin.py,sha256=Wfo-tDmAoFRFkM_nVywEZRlx_-qD_VBhyEpRTVVPjpI,4710
|
|
7
|
+
ErisPulse/sdk.py,sha256=IKo1HN2Su0_bOca6CLiRb7X5zDkD3o13fQsyO0x-pUQ,102
|
|
8
|
+
ErisPulse/util.py,sha256=duZ6XCkf4AXUT9gQxOv2GoTfH5WSODIvM9aGuQxAU-Q,1088
|
|
9
|
+
erispulse-1.0.10.dist-info/METADATA,sha256=W9WtjIdnw3rQm0gDTaEWXeF0n558PgxYXlE0Ec7VKYI,2628
|
|
10
|
+
erispulse-1.0.10.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
11
|
+
erispulse-1.0.10.dist-info/entry_points.txt,sha256=_FKA8Cj-pfmMwo3MmIlKa2s4YvW7JTiwNs9WoL-8iG8,79
|
|
12
|
+
erispulse-1.0.10.dist-info/top_level.txt,sha256=Lm_qtkVvNJR8_dXh_qEDdl_12cZGpic-i4HUlVVUMZc,10
|
|
13
|
+
erispulse-1.0.10.dist-info/RECORD,,
|
erispulse-1.0.9.dist-info/RECORD
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
ErisPulse/__init__.py,sha256=ADMbg8y80sxxZzNE3R5EI_65h6KpYHWNtPAwEjjxVlk,5836
|
|
2
|
-
ErisPulse/__main__.py,sha256=4tD2owe494v2hFGWuycqcE3eAehlOfqOmicP8datu6M,32053
|
|
3
|
-
ErisPulse/envManager.py,sha256=YLPZcH6nJUf9_fILp-Y6WHq6-B_B997PUDrIFFEJDzA,8541
|
|
4
|
-
ErisPulse/errors.py,sha256=DwIQ2nx3GyxSY0ogoeezTSP11MwSVFeR1tx7obkP9Rs,430
|
|
5
|
-
ErisPulse/logger.py,sha256=qOXrYVHZRZwNBhZJ0-rpVbOgtyH414ujHLFqJ49aPtM,1934
|
|
6
|
-
ErisPulse/origin.py,sha256=Wfo-tDmAoFRFkM_nVywEZRlx_-qD_VBhyEpRTVVPjpI,4710
|
|
7
|
-
ErisPulse/sdk.py,sha256=IKo1HN2Su0_bOca6CLiRb7X5zDkD3o13fQsyO0x-pUQ,102
|
|
8
|
-
ErisPulse/util.py,sha256=duZ6XCkf4AXUT9gQxOv2GoTfH5WSODIvM9aGuQxAU-Q,1088
|
|
9
|
-
erispulse-1.0.9.dist-info/METADATA,sha256=TIQO8XWvjM0QiTH4qtRABE-RJ1gkrHkNSD4CuCPj0EU,2397
|
|
10
|
-
erispulse-1.0.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
11
|
-
erispulse-1.0.9.dist-info/entry_points.txt,sha256=_FKA8Cj-pfmMwo3MmIlKa2s4YvW7JTiwNs9WoL-8iG8,79
|
|
12
|
-
erispulse-1.0.9.dist-info/top_level.txt,sha256=Lm_qtkVvNJR8_dXh_qEDdl_12cZGpic-i4HUlVVUMZc,10
|
|
13
|
-
erispulse-1.0.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|