MCPcopy Create free account
hub / github.com/MearaY/StegaPy / __init__

Method __init__

StegaPy/StegaPy.py:35–51  ·  view source on GitHub ↗

初始化 StegaPy 实例,绑定核心插件与系统配置。

(self, plugin: StegaPyPlugin, config: StegaPyConfig)

Source from the content-addressed store, hash-verified

33 NAMESPACE = "StegaPy"
34
35 def __init__(self, plugin: StegaPyPlugin, config: StegaPyConfig):
36 """初始化 StegaPy 实例,绑定核心插件与系统配置。"""
37 if plugin is None:
38 raise StegaPyException(
39 "未指定插件",
40 StegaPyErrors.NO_PLUGIN_SPECIFIED,
41 self.NAMESPACE
42 )
43 if config is None:
44 raise StegaPyException(
45 "未指定配置",
46 StegaPyErrors.UNHANDLED_EXCEPTION,
47 self.NAMESPACE
48 )
49
50 self.plugin = plugin
51 self.config = config
52
53 def embed_data(self, msg: bytes, msg_filename: Optional[str],
54 cover: Optional[bytes], cover_filename: Optional[str],

Callers

nothing calls this directly

Calls 1

StegaPyExceptionClass · 0.85

Tested by

no test coverage detected