drive.factory package#

Submodules#

drive.factory.factory module#

class drive.factory.factory.AnalysisObj(*args, **kwargs)[source]#

Bases: Protocol

Interface defining of an analysis object

analyze(**kwargs) Any[source]#

Method that will analyze the inputs according to the purpose of the plugin

exception drive.factory.factory.PluginNotFound(plugin_type: str)[source]#

Bases: Exception

Error that is raised if the user tries to load a plugin that is not there

drive.factory.factory.create(arguments: dict[str, Any]) AnalysisObj[source]#
drive.factory.factory.register(plugin_name: str, creation_func: Callable[[...], AnalysisObj]) None[source]#

registers the AnalysisObj plugin

drive.factory.factory.unregister(plugin_name: str) None[source]#

function that will unregister the plugin

Parameters:

plugin_name (str) – name of the plugin to be loaded. This name will be in json file

drive.factory.loader module#

File used to load in the different plugins

class drive.factory.loader.PluginInterface(*args, **kwargs)[source]#

Bases: Protocol

Interface that will define how a plugin looks like

static initialize() None[source]#

Method that will initialize the plugin

drive.factory.loader.import_module(name: str) PluginInterface[source]#

Import the plugin so it can be initialized

Parameters:

name (str) – name of the plugin

Return type:

PluginInterface

drive.factory.loader.load_plugins(plugins: list[str]) None[source]#

Calls the initialize method for each plugin

Module contents#