Skip to main content

Python plugin system with dynamic loading of plugins

Project description

Python Dynamic Plugins

License Pypi Python Versions

In a nutshell Python Dynamic plugins is a small library for manage Python plugins dynamically.

Quickstart

This library load and execute plugins dynamically.

It allows to load installed Python libraries with some constraints:

  • Module names starts with some word.
  • Load specific module on each Python library.
  • Loas specific function on a module.

This main idea of the project is to be able to create a plugin system which is easy to use and easy to maintain.

Install

> pip install dynamic-plugins

Usage

For this example we'll use the demo package demo_module that you can find in the demo_plugins folder.

Installing the demo plugin

> cd demo_plugins/demo_module
> pip install . -U

Load the function hello_world from the plugin:

from dynamic_plugins import get_modules

def main():
    functions = get_modules("demo-", entrypoint_module="setup", entrypoint_function="hello_world")

    for fn in functions:
        fn()

if __name__ == '__main__':
    main()

License

Dictionary Search is Open Source and available under the MIT.

Contributions

Contributions are very welcome. See CONTRIBUTING.md or skim existing tickets to see where you could help out.

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

dynamic-plugins-1.0.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Supported by

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