The gemstone.plugins module

This module provides various tools to create general use plugins for the microservice.

A plugin can override specific attributes from the BasePlugin class that will be called in specific situations.

Also, a plugin can define extra methods that can be used later inside the method calls, as shown in the following example:

def say_hello(self, name):
    self.get_plugin("remote_logging").log_info("Somebody said hello to {}".format(name))
    return True

The gemstone.plugins.BasePlugin class

class gemstone.plugins.BasePlugin[source]

Base class for creating a plugin.

name = None

The name of the plugin. Must be unique per microservice.


Called when an internal error occurs when a method was called.

Parameters:exc_instance – The caught Exception instance.

Called for every method call (even in batch requests, this method will be called for every request in batch).

Parameters:jsonrpc_request – a JsonRpcRequest instance.

Called once when the microservice starts, after it completed all the initialization steps


Called once when the microservice stops.


exception gemstone.plugins.PluginError[source]

Base class for plugin specific errors

exception gemstone.plugins.MissingPluginNameError[source]

Raised when a plugin does not have a properly configured name