Skip to content

Plugins mechanism in cloudmesh and flask_cm #33

@lee212

Description

@lee212

FG Cloud Metrics, for example, can be modularized in flask_cm as one of the plugins. By putting a simple plugins mechanism, flask_cm will be extensible and independent from other developments.

Python Yapsy and imp can support dynamically importing modules.
Simple steps would be as follows:

  • Create plugins directory i.e. cloudmesh/plugins
  • Insert plugin scripts into the directory e.g. ../plugins/metrics.py
  • Create dynamically loading function for plugins i.e. cloudmesh/cm_plugins.py
  • Use the instances of all plugin modules in the directory

Once we have plugins mechanism, we can simply add scripts into the plugins directory to dynamically load the extension scripts to the main applications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions