Sample plugin architecture for python
The following diagram demonstrates how these concepts are implemented in this package.
In order to make a new plugin you just need to make a class that implements the IPlugin interface and place it in the plugin directory(You can change the default directory by changing ...). Then you can overide the following methods to customize your plugin.
This method is used by the application to show the plugin information.
plugin_info = PluginInfo()
plugin_info.name = __name__
plugin_info.description = __name__
plugin_info.version = '0.1.0'
return
This is the method that gets called when the plugin is invoked by the application.
This is the method gets called when the plugin is getting unloaded so you can dispose unused resources that were used by the plugin.