Create a configuration base class

    It is built using :class:`ConfigurationMeta`. Subclassing such a base class
    will register exposed methods

    .. class:: Base

        .. attribute:: configuration

            Configuration dict that can be used by a Router or the API

        .. classmethod:: register(element, action, method)

            Register an element in the :attr:`configuration`

            :param element: the element to register
            :type element: tuple of (class, method name) or function
            :param string action: name of the exposed action that will hold the method
            :param string method: name of the exposed method

def create_configuration(name='Base'):
    """Create a configuration base class

    It is built using :class:`ConfigurationMeta`. Subclassing such a base class
    will register exposed methods

    .. class:: Base

        .. attribute:: configuration

            Configuration dict that can be used by a Router or the API

        .. classmethod:: register(element, action, method)

            Register an element in the :attr:`configuration`

            :param element: the element to register
            :type element: tuple of (class, method name) or function
            :param string action: name of the exposed action that will hold the method
            :param string method: name of the exposed method

    """
    @classmethod
    def register(cls, element, action, method):
        if not action in cls.configuration:
            cls.configuration[action] = {}
        if method in cls.configuration[action]:
            raise ValueError('Method %s already defined for action %s' % (method, action))
        cls.configuration[action][method] = element
    return ConfigurationMeta(name, (object,), {'configuration': {}, 'register': register})