Akademisches Studien- und Fristenmanagement mit Quellenprüfung, Datenschutz und realistischer Handlungsplanung.
The English summary is being prepared. Showing the original description.
用于 Python 应用程序的通用插件系统。自动发现、验证、容错。零依赖(仅使用 Python 标准库)。
The English summary is being prepared. Showing the original description.
See how to installReview the instructions the agent will receive before you install.
中文 —
plugin-system官方中文版本。
适用于 Python CLI 应用程序的容错插件系统。 故障插件绝不会阻止应用程序其余部分的运行。
name、version、execute()scripts/
plugin_system.py Core: PluginBase (ABC) + PluginManager
cli_demo.py Demo CLI with argparse
test_plugin_system.py 16+ unit tests
examples/
hello.py Hello World plugin
calculator.py Calculator plugin
systeminfo.py System Info plugin
from plugin_system import PluginBase
class MyPlugin(PluginBase):
name = "MyPlugin"
version = "1.0.0"
def execute(self, *args, **kwargs):
return {"status": "ok", "message": "Hello!"}
from plugin_system import PluginManager
manager = PluginManager(plugins_dir="./my_plugins")
plugins = manager.discover_plugins()
# List all plugins (Deutsch)
manager.list_plugins()
# Execute a plugin (Deutsch)
success, result = manager.execute_plugin("MyPlugin", param="value")
if success:
print(result)
class MyApp:
def __init__(self):
self.plugins = PluginManager("./plugins")
self.plugins.discover_plugins()
def run_command(self, command, **params):
success, result = self.plugins.execute_plugin(command, **params)
return result if success else None
每个插件必须:
| 要求 | 详细信息 |
|---|---|
继承 PluginBase | from plugin_system import PluginBase |
设置 name | 类属性,不能为空 |
设置 version | 类属性,语义化版本 |
实现 execute() | 接收任意 *args, **kwargs |
| 错误类型 | 行为 |
|---|---|
| 插件中存在 SyntaxError | 跳过该插件,加载其余部分 |
| 缺少必需属性 | 插件被标记为 is_valid=False |
execute() 抛出异常 | 返回 (False, error_message) |
| 目录中没有插件 | 返回空列表,不会崩溃 |
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Akademisches Studien- und Fristenmanagement mit Quellenprüfung, Datenschutz und realistischer Handlungsplanung.
The English summary is being prepared. Showing the original description.
Aktives Lernen, Erarbeitung von Fachinhalten und strukturierte Erstellung von Synthesen.
The English summary is being prepared. Showing the original description.
Prüfungsvorbereitung, Selbsttests, Probeklausuren und systematische Fehleranalyse.
The English summary is being prepared. Showing the original description.
Terapia de Aceptación y Compromiso (ACT) según Steven Hayes: modelo Hexaflex con los seis procesos nucleares de la flexibilidad psicológica.
The English summary is being prepared. Showing the original description.
Acceptance & Commitment Therapy (ACT) nach Steven Hayes: Hexaflex-Modell mit den sechs Kernprozessen psychischer Flexibilität.
The English summary is being prepared. Showing the original description.
スティーブン・ヘイズによるアクセプタンス&コミットメント・セラピー(ACT):心理的柔軟性の6つのコアプロセスを備えたヘキサフレックス・モデル。
The English summary is being prepared. Showing the original description.