Skip to main content

lightweight python plugin system supporting config inheritance

Project description


PyPI PyPI Tests Codecov

lightweight python plugin system supporting config inheritance

To use

There is a full example at

Create the manager, for example in a module file

import pluginmgr

# this is the namespace string that import uses
namespace = 'pluginmgr_test.plugins'

# directories to look in, string or list of strings
searchpath = 'path/to/search/in'

# determines if this should create a blank loader to import through. This
# should be enabled if there isn't a real module path for the namespace and
# disabled for sharing the namespace with static modules
# default is False
create_loader = False

plugin = pluginmgr.PluginManager(namespace, searchpath, create_loader)

Create and register a plugin, note the filename needs to be the same as registered name

from pluginmgr_test import plugin

# register a plugin named mod0
class Mod0(pluginmgr.PluginBase):

See the dict containing all registered plugins

from pluginmgr_test import plugin

# dict of all registered plugins

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pluginmgr, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size pluginmgr-1.0.1-py3-none-any.whl (9.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pluginmgr-1.0.1.tar.gz (8.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page