envisage.egg_basket_plugin_manager module

A plugin manager that finds plugins in eggs on the ‘plugin_path’.

class envisage.egg_basket_plugin_manager.EggBasketPluginManager(plugins=None, **traits)[source]

Bases: envisage.plugin_manager.PluginManager

A plugin manager that finds plugins in eggs on the ‘plugin_path’.

To declare a plugin (or plugins) in your egg use an entry point in your ‘setup.py’ file, e.g.

[envisage.plugins] acme.foo = acme.foo.foo_plugin:FooPlugin acme.foo.fred = acme.foo.fred.fred_plugin:FredPlugin

The left hand side of the entry point declaration MUST be the same as the ‘id’ trait of the plugin (e.g. the ‘FooPlugin’ would have its ‘id’ trait set to ‘acme.foo’). This allows the plugin manager to filter out plugins using the ‘include’ and ‘exclude’ lists (if specified) without having to import and instantiate them.

ENVISAGE_PLUGINS_ENTRY_POINT = 'envisage.plugins'