organoid_tracker.plugin.plugin_manager module

class organoid_tracker.plugin.plugin_manager.PluginManager

Bases: object

Holds all plugins in memory, as well as the folders where they were loaded from.

get_plugin_count() int

Gets the number of loaded plugins.

get_plugins() Iterable[Plugin]

Iterates over all loaded plugins.

get_registry() Registry
get_user_folders() Iterable[str]

Iterates over all plugin folders.

load_folder(folder: str, *, built_in_folder: bool = False)

Loads a new folder. New plugins are loaded immediately.

The folder argument is quite permissive. If it’s empty or already in use, this method does nothing. Any environment variables in it, like “%appdata%”, are expanded automatically. If the folder does not exist yet, it will be created.

If built_in_folder is True, then the folder will not appear in get_user_folders().

reload_plugins()

Reloads all plugins. Any new plugins in the folders will be picked up, any removed plugins will be unloaded.

unregister_folder(folder: str)

Removes the folder from the list of folders. Will have no effect on loaded plugins until you reload the plugins.