def register_callback(self, public_name, callback, response_class=None,
                          args_extra=None):
        if response_class is None:
            response_class = BaseResponse
        if not hasattr(response_class, '__call__'):
            raise SijaxError('response_class needs to be a callable!')

        if args_extra is None:
            args_extra = []
        else:
            if isinstance(args_extra, tuple):
                args_extra = list(args_extra)
            elif not isinstance(args_extra, list):
                raise SijaxError('args_extra could only be a tuple or a list!')

        params = {}
        params[self.__class__.PARAM_CALLBACK] = callback
        params[self.__class__.PARAM_RESPONSE_CLASS] = response_class
        params[self.__class__.PARAM_ARGS_EXTRA] = args_extra

        self._callbacks[public_name] = params
        return self
Registers the specified callback function with the given name.
dataset/ETHPy150Open spantaleev/sijax-python/sijax/core.py/Sijax.register_callback