Created
May 4, 2024 17:17
-
-
Save ashish-mj/c077a3ed488d46cb8c9a2e1cd66a131c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import grpc | |
import helloworld_pb2 | |
import helloworld_pb2_grpc | |
def run(): | |
with grpc.insecure_channel("localhost:50051") as channel: | |
stub = helloworld_pb2_grpc.GreeterStub(channel) | |
response = stub.SayHello(helloworld_pb2.HelloRequest(name="World")) | |
print("Greeter client received: " + response.message) | |
if __name__ == "__main__": | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment