Skip to main content

Python Plugin Management, simplified

Project description

Build Status Coverage Status Code Climate

python plugin management, simplified.

from pluginmanager import PluginInterface

plugin_interface = PluginInterface()
plugin_interface.set_plugin_directories('my/fancy/plugin/path')
plugin_interface.collect_plugins()

plugins = plugin_interface.get_instances()

Library currently under heavy development and may not be ready for use

Installation

pip install pluginmanager

-or-

pip install git+https://github.com/benhoff/pluginmanager.git

Architecture

pluginmanager was designed to be as extensible as possible while also being easy to use. There are three layers of access.

Interfaces:

public facing

Managers:

extended or replaced

Filters:

implementation specific

Interfaces

Interfaces were used to provide a simple programmer interface while maintaining the ability to separate out the concerns of the implementation. The main interface is the PluginInterface, which is designed to be as stateless as possible, and have interjectable options, where applicable.

PluginInterface provides the cability to instantiate two other interfaces, the BlacklistInterface and FilterInterface. These interfaces provide universal access to the blacklisting (selectively implemented) and filtering APIs respectively.

Managers

There are four managers which make up the core of the library.

DirectoryManager:

Maintains directory state. Responsbile for recursively searching through directories

FileManager:

Can maintain filepath state. Does maintain file filter state. Responsible for applying file filters to filepaths passed gotten from directories

ModuleManager:

Loads modules from source code. Keeps track of loaded modules. Maintains module filter state. Responsible for applying module filters to modules to get out plugins.

PluginManager:

Instantiates plugins. Maintains plugin state.

Filters

Filters are designed to offer implementation-level extensiblity. Want to only return only files start with “plugin”? Create a filter for it. Or use some of the provided filters to provide the desired implementation.

NOTE: Final implementation of filters and how they interact with the library is currently a WIP and should be considered unstable.

Project details


Download files

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

Source Distribution

pluginmanager-0.0.10.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pluginmanager-0.0.10-py3-none-any.whl (67.9 kB view details)

Uploaded Python 3

File details

Details for the file pluginmanager-0.0.10.tar.gz.

File metadata

File hashes

Hashes for pluginmanager-0.0.10.tar.gz
Algorithm Hash digest
SHA256 daa54c84ddeee65d9eb3df31f8e9e7e1401b0ab55fadb38891084a70a08199c2
MD5 2e58258f4b1a85c86530058aa4a63640
BLAKE2b-256 5507e74fc029cfef10f6616bfce16247967cf526d72554414cadb49e54c8cf03

See more details on using hashes here.

File details

Details for the file pluginmanager-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for pluginmanager-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 066c1876d9400396363a42170299b53542ebad85f57e116b8df91dfe201b20d7
MD5 045dae93faeb370ffde74b345b65432f
BLAKE2b-256 d4f892c2b19cc37bfd09e41ba1edf81be53af2b3e26d56666d70114a945eda3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page