puresnmp.plugins.pluginbase module
- class puresnmp.plugins.pluginbase.Loader(namespace: str, validator: Callable[[ModuleType], bool])
Bases:
object
- puresnmp.plugins.pluginbase.discover_plugins(namespace: str, is_valid_module: Callable[[ModuleType], bool]) Dict[Any, ModuleType]
Load all plugins in the given namespace (only if it is a valid module)
Module validity check is handed off to the is_valid_module callable. Any module that is not valid is silently skipped.