aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/python/helloworld/greeter_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/python/helloworld/greeter_client.py')
-rw-r--r--examples/python/helloworld/greeter_client.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/python/helloworld/greeter_client.py b/examples/python/helloworld/greeter_client.py
index 40d637fb7b..44d42c102b 100644
--- a/examples/python/helloworld/greeter_client.py
+++ b/examples/python/helloworld/greeter_client.py
@@ -31,17 +31,15 @@
from __future__ import print_function
-from grpc.beta import implementations
+import grpc
import helloworld_pb2
-_TIMEOUT_SECONDS = 10
-
def run():
- channel = implementations.insecure_channel('localhost', 50051)
- stub = helloworld_pb2.beta_create_Greeter_stub(channel)
- response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'), _TIMEOUT_SECONDS)
+ channel = grpc.insecure_channel('localhost:50051')
+ stub = helloworld_pb2.GreeterStub(channel)
+ response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
print("Greeter client received: " + response.message)