Skip to main content

pluginmgr

PyPI PyPI Tests Codecov Language grade: Python

lightweight python plugin system supporting config inheritance

To use

There is a full example at https://github.com/20c/pluginmgr/tree/master/tests/pluginmgr_test

Create the manager, for example in a module __init__.py 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
@plugin.register('mod0')
class Mod0(pluginmgr.PluginBase):
    pass

See the dict containing all registered plugins

from pluginmgr_test import plugin

# dict of all registered plugins
print(plugin.registry)

Metadata

Release files for pluginmgr 1.2.1

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

Source distribution (sdist)

Source distribution for pluginmgr 1.2.1
File Size Uploaded
pluginmgr-1.2.1.tar.gz 73.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pluginmgr 1.2.1
File Interpreter ABI Platform
pluginmgr-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 83.2 kB

Release files / pluginmgr-1.2.1.tar.gz

Download URL pluginmgr-1.2.1.tar.gz
Size 73.7 kB
Tags Source
SHA-256 checksum
How to use checksums
eb4f78521861224e79ce045e6f97ffa06a347b955e6e69e44716acda4ca024d4
BLAKE2b-256 checksum
How to use checksums
f3f479b24459b62bcf4fb802fdc74da36703165ce1a5979395f5d22b9f0f5c45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.7

Release files / pluginmgr-1.2.1-py3-none-any.whl

Download URL pluginmgr-1.2.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee9ca530ad1a369c43cb4486fa6815d2fc99f9bc598d42414f96a98b36fc80c2
BLAKE2b-256 checksum
How to use checksums
19905423e558b63ac6002396ab6b3b03ee8d548c55731dad4e86608b4bc22507
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.7

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.6.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.0.1

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