(self, request, context, log=True)
return self.capabilities
Get capabilities.
        Note that either request or context is used in the implementation of this method, but still added as
        parameters. The reason is that gRPC always sends both when making a function call and therefore we must include
        them to avoid error messages regarding too many parameters provided from the client.
        :param request: the request, not used in this method.
        :param context: the context, not used in this method.
        :return: the capabilities.
Get capabilities.
        Note that either request or context is used in the implementation of this method, but still added as
        parameters. The reason is that gRPC always sends both when making a function call and therefore we must include
        them to avoid error messages regarding too many parameters provided from the client.
        :param request: the request, not used in this method.
        :param context: the context, not used in this method.
        :return: the capabilities.
Get capabilities . Note that either request or context is used in the implementation of this method but still added as parameters . The reason is that gRPC always sends both when making a function call and therefore we must include them to avoid error messages regarding too many parameters provided from the client . : param request : the request not used in this method . : param context : the context not used in this method . : return : the capabilities .
def GetCapabilities(self, request, context, log=True):
        """
        Get capabilities.
        Note that either request or context is used in the implementation of this method, but still added as
        parameters. The reason is that gRPC always sends both when making a function call and therefore we must include
        them to avoid error messages regarding too many parameters provided from the client.
        :param request: the request, not used in this method.
        :param context: the context, not used in this method.
        :return: the capabilities.
        """
        if log:
            logging.info('GetCapabilities')

        # Create an instance of the Capabilities grpc message
        # Enable(or disable) script evaluation
        # Set values for pluginIdentifier and pluginVersion
        self.capabilities = SSE.Capabilities(allowScript=False,
                                        pluginIdentifier='Qlik Python Tools',
                                        pluginVersion='v2.3.0')

        # If user defined functions supported, add the definitions to the message
        with open(self.function_definitions) as json_file:
            # Iterate over each function definition and add data to the Capabilities grpc message
            for definition in json.load(json_file)['Functions']:
                function = self.capabilities.functions.add()
                function.name = definition['Name']
                function.functionId = definition['Id']
                function.functionType = definition['Type']
                function.returnType = definition['ReturnType']

                # Retrieve name and type of each parameter
                for param_name, param_type in sorted(definition['Params'].items()):
                    function.params.add(name=param_name, dataType=param_type)

                if log:
                    logging.info('Adding to capabilities: {}({})'.format(function.name,
                                                                        [p.name for p in function.params]))

        return self.capabilities
def GetCapabilities ( self , request , context , log = True ) : if log : logging . info ( 'GetCapabilities' ) # Create an instance of the Capabilities grpc message # Enable(or disable) script evaluation # Set values for pluginIdentifier and pluginVersion self . capabilities = SSE . Capabilities ( allowScript = False , pluginIdentifier = 'Qlik Python Tools' , pluginVersion = 'v2.3.0' ) # If user defined functions supported, add the definitions to the message with open ( self . function_definitions ) as json_file : # Iterate over each function definition and add data to the Capabilities grpc message for definition in json . load ( json_file ) [ 'Functions' ] : function = self . capabilities . functions . add ( ) function . name = definition [ 'Name' ] function . functionId = definition [ 'Id' ] function . functionType = definition [ 'Type' ] function . returnType = definition [ 'ReturnType' ] # Retrieve name and type of each parameter for param_name , param_type in sorted ( definition [ 'Params' ] . items ( ) ) : function . params . add ( name = param_name , dataType = param_type ) if log : logging . info ( 'Adding to capabilities: {}({})' . format ( function . name , [ p . name for p in function . params ] ) ) return self . capabilities