Skip to content

Plugin manager

plugin_manager

This module contains code that supports Build Plugins.

PluginDescriptor

Plugin Descripter.

Attributes:

Name Type Description
descripter(Dict)

descriptor

Obj obj

Object

Name str

name attribute from descriptor

Module obj

module attribute from descriptor

__init__

__init__(t: dict) -> None

Inits the Plugin descriptor with the Descriptor.

__str__

__str__() -> str

String representation of the plugin descriptor.

PluginManager

A class that manages all plugins in the environment.

Attributes:

Name Type Description
Descriptors List[PluginDescriptor]

list of plugin descriptors

__init__

__init__() -> None

Inits an empty plugin manager.

SetListOfEnvironmentDescriptors

SetListOfEnvironmentDescriptors(newlist: list) -> int

Passes a tuple of environment descriptor dictionaries to be loaded as plugins.

GetPluginsOfClass

GetPluginsOfClass(classobj: type) -> list[object]

Return list of all plugins of a given class.

Returns:

Type Description
list[object]

list[object]: plugin instances of the requested class

GetAllPlugins

GetAllPlugins() -> list[object]

Return list of all plugins.