PluginLoader

The PluginLoader dynamically loads and manages plugins from the mloda_plugins package.

Quick Start

from mloda_core.abstract_plugins.plugin_loader import PluginLoader

# Load all plugins
loader = PluginLoader.all()

# Or load specific groups
loader = PluginLoader()
loader.load_group("feature_group")

Main Methods

PluginLoader.all()

Creates a loader and loads all available plugins.

load_group(group_name: str)

Loads plugins from a specific group folder.

load_all_plugins()

Loads all plugin groups.

list_loaded_modules(plugin_category: Optional[str])

Lists loaded plugin modules, optionally filtered by category.

display_plugin_graph(plugin_category: Optional[str])

Shows plugin dependencies as a graph.

Plugin Groups

Group Depends On Description
input_data feature_group Data input plugins
feature_group None Feature group definitions
compute_framework None Computation frameworks
function_extender None Function extensions

Example

# Create loader and load plugins
loader = PluginLoader()
loader.load_all_plugins()

# List loaded modules
modules = loader.list_loaded_modules()

# Show dependencies
graph = loader.display_plugin_graph()

Directory Structure

mloda_plugins/
├── input_data/
├── feature_group/
├── compute_framework/
└── function_extender/

Plugins are automatically discovered from .py files in these directories.