Plugins
Utility functions for handling plugins, eg. importing, downloading, listing, confirming, etc.
Functions:
|
Import all plugins in the plugin (or supplied) directory. |
Un-import imported plugins (mostly for testing purposes) |
|
List plugins available on the wiki using |
- import_plugins(plugin_dir: Optional[pathlib.Path] = None) dict [source]
Import all plugins in the plugin (or supplied) directory.
There is no specific form for a plugin at the moment, so this function will recursively import all modules and packages within the directory.
Plugins can then be accessed by the
get()
registry functions.- Parameters
plugin_dir (None,
pathlib.Path
) – Directory to import. ifNone
(default), useprefs.get('PLUGINDIR')
.- Returns
of imported objects with form {“class_name”: class_object}
- Return type
- list_wiki_plugins()[source]
List plugins available on the wiki using
utils.wiki.ask()
- Returns
{‘plugin_name’: {‘plugin_prop’:’prop_value’,…}
- Return type