cement.core.plugin

Cement core plugins module.

class cement.core.plugin.PluginHandler(**kw: Any)[source]

Bases: PluginInterface, Handler

Plugin handler implementation.

class Meta[source]

Bases: Meta

class cement.core.plugin.PluginInterface(**kw: Any)[source]

Bases: Interface

This class defines the Plugin Interface. Handlers that implement this interface must provide the methods and attributes defined below. In general, most implementations should sub-class from the provided PluginHandler base class as a starting point.

class Meta[source]

Bases: Meta

interface: str = 'plugin'

String identifier of the interface.

abstract get_disabled_plugins() List[str][source]

Returns a list of plugins that are disabled in the config.

abstract get_enabled_plugins() List[str][source]

Returns a list of plugins that are enabled in the config.

abstract get_loaded_plugins() List[str][source]

Returns a list of plugins that have been loaded.

abstract load_plugin(plugin_name: str) None[source]

Load a plugin whose name is plugin_name.

Parameters:

plugin_name (str) – The name of the plugin to load.

abstract load_plugins(plugins: List[str]) None[source]

Load all plugins from plugins.

Parameters:

plugins (list) – A list of plugin names to load.