def __call__(self, *args, **kwargs):
        """Compile-time decorator (turn on the tool in config).

        For example::

            @expose
            @tools.proxy()
            def whats_my_base(self):
                return cherrypy.request.base
        """
        if args:
            raise TypeError(
                'The %r Tool does not accept positional '
                'arguments; you must use keyword arguments.' % self._name,
            )

        def tool_decorator(f):
            if not hasattr(f, '_cp_config'):
                f._cp_config = {}
            subspace = self.namespace + '.' + self._name + '.'
            f._cp_config[subspace + 'on'] = True
            for k, v in kwargs.items():
                f._cp_config[subspace + k] = v
            return f

        return tool_decorator
Compile-time decorator (turn on the tool in config).

        For example::

            @expose
            @tools.proxy()
            def whats_my_base(self):
                return cherrypy.request.base
        
cherrypy/_cptools.py