A super simple plugin system for python
pip install sspps
Load plugins from directory 'plugins':
import sspps
pl = sspps.PluginLoader('plugins')
pl.load_all()
Create a plugin by putting a module in plugins directory:
import sspps
class MyPlugin(sspps.Plugin):
enabled = True
def __init__(self):
print 'init!'
def activate(self):
print 'Activated!'
The plugin loader will only instantiate subclasses of ssps.Plugin so feel free to make your own classes in plugin files.
Plugin modules can be either python files or module directories.