infocentre_data_manager.plugins.plugin_module

plugin_modules.py

This module has the implementation of the plugin module base class from where the rest of the plugin classes are derived.

Classes

  • PluginModule: Base class that implements the plugin architecture. All direct
class infocentre_data_manager.plugins.plugin_module.PluginModule

Base class that implements the plugin architecture. All direct subclasses of this module represent different stages and they have a factory method that scans their directory (e.g. codecs, data_validators, …) and instantiates a particular subsubclass (e.g. ExcelCodec) with only their name (e.g. ‘excel’). For new plugins of a particular type this doesn’t require any imports; this class automatically scans the directory for suitable modules and classes.

Inheritance

Inheritance diagram of PluginModule
classmethod get(id=None, **kwargs)

Instantiates the specified plugin.

Parameters:
  • id (str) – plugin id (e.g. ‘excel’, ‘mysql’, …)
  • kwargs (dict) – optional arguments
Returns:

Plugin

Return type:

PluginModule

classmethod get_plugins()

Returns the plugins of cls defined on the entry_point ‘data_manager.<plugin_class>’.

Returns:Dictionary with elements {plugin_name: plugin_class}
Return type:dict