Created
December 30, 2019 23:47
-
-
Save gistlyn/f6945d467ee77bec048d64f57b447d5f to your computer and use it in GitHub Desktop.
Python Google protoc insecure GrpcServicesClient TodoWorld Example
This file contains hidden or 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 services_pb2 | |
import services_pb2_grpc | |
def run(): | |
with grpc.insecure_channel('todoworld.servicestack.net:5054') as channel: | |
client = services_pb2_grpc.GrpcServicesStub(channel) | |
response = client.GetHello(services_pb2.Hello(Name="gRPC Python")) | |
print(response.Result) | |
if __name__ == '__main__': | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment