skip to navigation
skip to content

annex 0.3.1

A Simple Plugin System for Python

Latest Version: 0.4.0


Annex provides assistance with developing plugin-based tools.

With Annex you can load and reload plugins from various python modules without the requirement that they exist on the PYTHONPATH.

Example Usage

In your project you would define a base class from which all plugins for project would subclass.

class BaseTestPlugin(object):
    def run(self, *args, **kwargs):
        raise NotImplementedError()

from base_plugin import BaseTestPlugin

class PrinterPlugin(BaseTestPlugin):
    def run(self, *args, **kwargs):
        print args, kwargs

from base_plugin import BaseTestPlugin
from annex import Annex

plugins = Annex(BaseTestPlugin, ["/path/to/plugins"])

for plugin in plugins:"foo", bar="baz")
File Type Py Version Uploaded on Size
annex-0.3.1.tar.gz (md5) Source 2014-07-16 3KB