示例#1
0
 def get_streaming_digest(self, message):
     """
     Client function to call the rpc for GetDStream
     """
     to_digest_message = digestor_pb2.DigestMessage(ToDigest=message)
     digested_words = self.stub.GetDStream(to_digest_message)
     for digested_word in digested_words:
         print(digested_word)
    def get_digest(self, message):
        """
        Client function to call the rpc for GetDigest 
        """
        to_digest_message_request = digestor_pb2.DigestMessage(
            ToDigest=message)

        response = self.stub.GetDigestor(to_digest_message_request)
        return response
示例#3
0
 def get_digest(self, message: str):
     r = digestor_pb2.DigestMessage(ToDigest=message)
     return self.stub.GetDigestor(r)