helloworld/helloworld_pb2_grpc.py
Go to the documentation of this file.
1 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 import grpc
3 
4 import helloworld_pb2 as helloworld__pb2
5 
6 
7 class GreeterStub(object):
8  """The greeting service definition.
9  """
10 
11  def __init__(self, channel):
12  """Constructor.
13 
14  Args:
15  channel: A grpc.Channel.
16  """
17  self.SayHello = channel.unary_unary(
18  '/helloworld.Greeter/SayHello',
19  request_serializer=helloworld__pb2.HelloRequest.SerializeToString,
20  response_deserializer=helloworld__pb2.HelloReply.FromString,
21  )
22 
23 
24 class GreeterServicer(object):
25  """The greeting service definition.
26  """
27 
28  def SayHello(self, request, context):
29  """Sends a greeting
30  """
31  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
32  context.set_details('Method not implemented!')
33  raise NotImplementedError('Method not implemented!')
34 
35 
36 def add_GreeterServicer_to_server(servicer, server):
37  rpc_method_handlers = {
39  servicer.SayHello,
40  request_deserializer=helloworld__pb2.HelloRequest.FromString,
41  response_serializer=helloworld__pb2.HelloReply.SerializeToString,
42  ),
43  }
44  generic_handler = grpc.method_handlers_generic_handler(
45  'helloworld.Greeter', rpc_method_handlers)
46  server.add_generic_rpc_handlers((generic_handler,))
helloworld_pb2_grpc.GreeterStub
Definition: helloworld/helloworld_pb2_grpc.py:7
grpc.unary_unary_rpc_method_handler
def unary_unary_rpc_method_handler(behavior, request_deserializer=None, response_serializer=None)
Definition: src/python/grpcio/grpc/__init__.py:1510
helloworld_pb2_grpc.GreeterStub.__init__
def __init__(self, channel)
Definition: helloworld/helloworld_pb2_grpc.py:11
grpc.method_handlers_generic_handler
def method_handlers_generic_handler(service, method_handlers)
Definition: src/python/grpcio/grpc/__init__.py:1590
helloworld_pb2_grpc.GreeterServicer
Definition: helloworld/helloworld_pb2_grpc.py:24
helloworld_pb2_grpc.add_GreeterServicer_to_server
def add_GreeterServicer_to_server(servicer, server)
Definition: helloworld/helloworld_pb2_grpc.py:36
helloworld_pb2_grpc.GreeterServicer.SayHello
def SayHello(self, request, context)
Definition: helloworld/helloworld_pb2_grpc.py:28
helloworld_pb2_grpc.GreeterStub.SayHello
SayHello
Definition: helloworld/helloworld_pb2_grpc.py:17


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:12