[docs]asyncdefget_response()->hello_pb2.HelloReply:"""Establish a connection, send hello and return the reply. Asyncyhronous. """asyncwithgrpc.aio.insecure_channel("localhost:50051")aschannel:stub=hello_pb2_grpc.GreeterStub(channel)returnawaitstub.SayHello(hello_pb2.HelloRequest(name="you"))
[docs]asyncdefrun()->None:# pragma: no coverresp=awaitget_response()print("Greeter client received: "+resp.message)
if__name__=="__main__":# pragma: no coverlogging.basicConfig()asyncio.run(run())