:mod:`dip.plugins.default_plugin_manager` ========================================= .. module:: dip.plugins.default_plugin_manager The :mod:`dip.plugins.plugin_manager` module contains dip's default :term:`plugin manager` implementation. :class:`PluginManager` ---------------------- .. class:: PluginManager Base class: :class:`~dip.model.Model` The PluginManager class is the default implementation of the :class:`~dip.plugins.IPluginManager` interface. .. method:: PluginManager.bind_extension_point(id, obj, name) Bind an extension point to an attribute of an object. The attribute must have an ``append()`` method. :param id: is the identifier of the extension point. :param obj: is the object containing the attribute that the extension point is bound to. :param name: is the name of the attribute that the extension point is bound to. .. method:: PluginManager.bind_service(interface, obj, name) Bind the service for an interface to an attribute of an object. :param interface: is the interface. :param obj: is the object containing the attribute that the service is bound to. :param name: is the name of the attribute that the service is bound to. .. method:: PluginManager.choose_service(services) Choose a particular service from a list of possible services. :param services: a list of contributed services to choose from. :return: the chosen service or ``None`` if one wasn't chosen. .. method:: PluginManager.contribute(id, contribution) Contribute an object to an extension point. :param id: is the identifier of the extension point. :param contribution: is the contribution to make to the extension point. .. method:: PluginManager.service(interface) Get a service for a particular interface. :param interface: is the interface. :return: the service which will implement or be able to be adapted to the interface. An exception is raised if there is no service available.