Part of elisa.core.plugin_registry View In Hierarchy
Line # | Kind | Name | Docs |
---|---|---|---|
78 | Method | __init__ | Undocumented |
181 | Method | load_plugins | Load plugins from self.plugin_dirs. |
283 | Method | enable_plugin | Enable a plugin. |
301 | Method | disable_plugin | Disable a plugin. |
320 | Method | get_plugins | Get the list of available plugins. |
332 | Method | get_enabled_plugins | Get the list of enabled plugins. |
345 | Method | get_plugin_names | Get the names of the installed plugins. |
356 | Method | create_component | Create a component given its path. |
Load plugins from self.plugin_dirs.
This function should be called as early as possible at startup, _before_ using any plugin. Note that this function runs without returning to the reactor for as long as it takes. There's no point in making it return before it's done as the plugin environment needs to be setup before any other part of elisa can run correctly.
You can optionally pass a list of plugin names to enable. If you don't or pass None, all the available plugins are enabled.Parameters | plugin_names | the names of the plugins to enable. If None, all the available plugins are enabled. (type: sequence of strings or None ) |
Parameters | plugin_name | the name of the plugin to enable
(type: str
) |
Parameters | plugin_name | the name of the plugin to disable
(type: str
) |
Get the list of available plugins. This call returns (plugin_name, status) tuples, where status is True if the plugin is enabled, False otherwise. @return generator yielding (plugin_name, status) tuples @rtype: C{generator}
Returns | generator yielding plugin names
(type: generator
) |
Parameters | path | plugin path, defaults to 'elisa.plugins'
(type: str
) |
Returns | a generator object yielding plugin names
(type: generator
) |
Create a component given its path.
The path is in module:Component syntax, eg elisa.plugins.my_plugin:MyComponent.Parameters | path | the component path
(type: str
) |
config | the configuration to set for the component
(type: elisa.core.config.Config
) | |
Returns | an instance of the component identified by path
(type: elisa.core.component.Component
or a subclass
) |