xpublish.Rest.register_plugin#

Rest.register_plugin(plugin, plugin_name=None, overwrite=False)[source]#

Register a plugin with the xpublish system

Parameters
  • plugin (Plugin) – Instantiated Plugin object

  • plugin_name (Optional[str]) – Plugin name

  • overwrite (bool) – If a plugin of the same name exist, setting this to True will remove the existing plugin before registering the new plugin. Defaults to False.

Raises
  • AttributeError – Plugin can not be registered

  • ValueError – Plugin already registered, try setting overwrite to True