The dip.plugins.plugin_manager module contains dip’s default plugin manager implementation.
Base class: Model
The PluginManager class is the default implementation of the IPluginManager interface.
Bind an extension point to an attribute of an object. The attribute must have an append() method.
| Parameters: |
|
|---|
Bind the service for an interface to an attribute of an object.
| Parameters: |
|
|---|
Choose a particular service from a list of possible services.
| Parameter: | services – a list of contributed services to choose from. |
|---|---|
| Returns: | the chosen service or None if one wasn’t chosen. |
Contribute an object to an extension point.
| Parameters: |
|
|---|
Get a service for a particular interface.
| Parameter: | interface – is the interface. |
|---|---|
| Returns: | the service which will implement or be able to be adapted to the interface. An exception is raised if there is no service available. |