errbot.specific_plugin_manager module

class errbot.specific_plugin_manager.SpecificPluginLocator(name_to_find)[source]

Bases: yapsy.PluginFileLocator.PluginFileAnalyzerWithInfoFile

This is a plugin locator (kind of filter in yapsy jargon) to match a backend. We have to go through hoops because yapsy is really aggressive at instanciating plugin. (this would instantiate several bots, we don’t want to do that).

__init__(name_to_find)[source]

Initialize self. See help(type(self)) for accurate signature.

getInfosDictFromPlugin(dirpath, filename)[source]

Returns the extracted plugin informations as a dictionary. This function ensures that “name” and “path” are provided.

If callback function has not been provided for this strategy, we use the filename alone to extract minimal informations.

class errbot.specific_plugin_manager.SpecificPluginManager(bot_config, category, base_class, base_search_dir, extra_search_dirs=())[source]

Bases: yapsy.PluginManager.PluginManager

SpecificPluginManager is a customized plugin manager to enumerate plugins and load only a specific one.

__init__(bot_config, category, base_class, base_search_dir, extra_search_dirs=())[source]

Initialize self. See help(type(self)) for accurate signature.

get_candidate(name)[source]

Find the plugin by name.

Parameters:name – The name of the plugin you are looking for.
Returns:
raise Exception:
 
get_plugin_by_name(name)[source]
instanciateElement(element)[source]

Override the loading method to inject config :param element: plugin class to load.