Skip to content

PluginLoader

PluginLoader

PluginLoader(
    app, plugins_dirpath=None, plugins_config_path=None
)

app instance-attribute

app = app

A link to the image of the SeaPlayer class.

error_plugins instance-attribute

error_plugins = []

A list with plugins (more precisely, with the paths to them) that could not be loaded.

off_plugins instance-attribute

off_plugins = []

A list with disabled plugins (more precisely, with information about them).

on_plugins instance-attribute

on_plugins = []

A list with initialized plugin classes.

plugins_config_path instance-attribute

plugins_config_path = Path(
    os.path.abspath(
        plugins_config_path or PLUGINS_CONFIG_PATH
    )
)

The path to the plugin loader configuration file.

plugins_dirpath instance-attribute

plugins_dirpath = Path(
    os.path.abspath(plugins_dirpath or PLUGINS_DIRPATH)
)

The path to the plugin folder.

PluginLoaderConfigManager

PluginLoaderConfigManager(path)

config instance-attribute

config = self.load(self.filepath, default_data)

Contains attributes from the plugin configuration file.

filepath instance-attribute

filepath = Path(path)

The path to the plugin configuration file.

dump staticmethod

dump(path, data)

Overwriting configurations.

Parameters
Parameter Default Description
path
str
required

The path to the plugin configuration file.

data
PluginLoaderConfigModel
required

Contains attributes from the plugin configuration file.

load staticmethod

load(path, default_data)

Loading configurations.

Parameters
Parameter Default Description
path
str
required

The path to the plugin configuration file.

default_data
Dict[str, Any]
required

The standard values of the configuration file.

Returns
Name Type Description
PluginLoaderConfigModel PluginLoaderConfigModel

Contains attributes from the plugin configuration file.