Skip to main content

annex

Summary

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.

base_plugin.py

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

example_plugin.py

from base_plugin import BaseTestPlugin

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

foo.py

from base_plugin import BaseTestPlugin
from annex import Annex

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

for plugin in plugins:
    plugin.run("foo", bar="baz")

Release files for annex 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for annex 0.5.0
File Size Uploaded
annex-0.5.0.tar.gz 4.3 kB Details

Release files / annex-0.5.0.tar.gz

Download URL annex-0.5.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2b89c89ecef0911dd1bc52ce582c2b7b26b8621f4db3cc58df39e652b9636e8b
BLAKE2b-256 checksum
How to use checksums
c4036c73f4e91312abbec5efab91ad91483fb23613d1c50d436cc2c320f7bf42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release history Release notifications | RSS feed

This release

0.5.0 This release

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page