hellostreamingworld_pb2_grpc.py
Go to the documentation of this file.
1 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 """Client and server classes corresponding to protobuf-defined services."""
3 import grpc
4 
5 import hellostreamingworld_pb2 as hellostreamingworld__pb2
6 
7 
8 class MultiGreeterStub(object):
9  """The greeting service definition.
10  """
11 
12  def __init__(self, channel):
13  """Constructor.
14 
15  Args:
16  channel: A grpc.Channel.
17  """
18  self.sayHello = channel.unary_stream(
19  '/hellostreamingworld.MultiGreeter/sayHello',
20  request_serializer=hellostreamingworld__pb2.HelloRequest.SerializeToString,
21  response_deserializer=hellostreamingworld__pb2.HelloReply.FromString,
22  )
23 
24 
25 class MultiGreeterServicer(object):
26  """The greeting service definition.
27  """
28 
29  def sayHello(self, request, context):
30  """Sends multiple greetings
31  """
32  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
33  context.set_details('Method not implemented!')
34  raise NotImplementedError('Method not implemented!')
35 
36 
37 def add_MultiGreeterServicer_to_server(servicer, server):
38  rpc_method_handlers = {
40  servicer.sayHello,
41  request_deserializer=hellostreamingworld__pb2.HelloRequest.FromString,
42  response_serializer=hellostreamingworld__pb2.HelloReply.SerializeToString,
43  ),
44  }
45  generic_handler = grpc.method_handlers_generic_handler(
46  'hellostreamingworld.MultiGreeter', rpc_method_handlers)
47  server.add_generic_rpc_handlers((generic_handler,))
48 
49 
50  # This class is part of an EXPERIMENTAL API.
51 class MultiGreeter(object):
52  """The greeting service definition.
53  """
54 
55  @staticmethod
56  def sayHello(request,
57  target,
58  options=(),
59  channel_credentials=None,
60  call_credentials=None,
61  insecure=False,
62  compression=None,
63  wait_for_ready=None,
64  timeout=None,
65  metadata=None):
66  return grpc.experimental.unary_stream(request, target, '/hellostreamingworld.MultiGreeter/sayHello',
67  hellostreamingworld__pb2.HelloRequest.SerializeToString,
68  hellostreamingworld__pb2.HelloReply.FromString,
69  options, channel_credentials,
70  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
grpc.unary_stream_rpc_method_handler
def unary_stream_rpc_method_handler(behavior, request_deserializer=None, response_serializer=None)
Definition: src/python/grpcio/grpc/__init__.py:1530
hellostreamingworld_pb2_grpc.MultiGreeterStub.__init__
def __init__(self, channel)
Definition: hellostreamingworld_pb2_grpc.py:12
hellostreamingworld_pb2_grpc.add_MultiGreeterServicer_to_server
def add_MultiGreeterServicer_to_server(servicer, server)
Definition: hellostreamingworld_pb2_grpc.py:37
hellostreamingworld_pb2_grpc.MultiGreeterServicer.sayHello
def sayHello(self, request, context)
Definition: hellostreamingworld_pb2_grpc.py:29
hellostreamingworld_pb2_grpc.MultiGreeterStub.sayHello
sayHello
Definition: hellostreamingworld_pb2_grpc.py:18
hellostreamingworld_pb2_grpc.MultiGreeterServicer
Definition: hellostreamingworld_pb2_grpc.py:25
grpc.method_handlers_generic_handler
def method_handlers_generic_handler(service, method_handlers)
Definition: src/python/grpcio/grpc/__init__.py:1590
hellostreamingworld_pb2_grpc.MultiGreeterStub
Definition: hellostreamingworld_pb2_grpc.py:8
hellostreamingworld_pb2_grpc.MultiGreeter
Definition: hellostreamingworld_pb2_grpc.py:51
hellostreamingworld_pb2_grpc.MultiGreeter.sayHello
def sayHello(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)
Definition: hellostreamingworld_pb2_grpc.py:56


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:01