ocr_pb2_grpc.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2. import grpc
  3. from proto import ocr_pb2 as proto_dot_ocr__pb2
  4. class OcrStub(object):
  5. """Missing associated documentation comment in .proto file"""
  6. def __init__(self, channel):
  7. """Constructor.
  8. Args:
  9. channel: A grpc.Channel.
  10. """
  11. self.Ocr = channel.unary_unary(
  12. '/proto.Ocr/Ocr',
  13. request_serializer=proto_dot_ocr__pb2.OcrRequest.SerializeToString,
  14. response_deserializer=proto_dot_ocr__pb2.OcrResponse.FromString,
  15. )
  16. class OcrServicer(object):
  17. """Missing associated documentation comment in .proto file"""
  18. def Ocr(self, request, context):
  19. """Missing associated documentation comment in .proto file"""
  20. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  21. context.set_details('Method not implemented!')
  22. raise NotImplementedError('Method not implemented!')
  23. def add_OcrServicer_to_server(servicer, server):
  24. rpc_method_handlers = {
  25. 'Ocr': grpc.unary_unary_rpc_method_handler(
  26. servicer.Ocr,
  27. request_deserializer=proto_dot_ocr__pb2.OcrRequest.FromString,
  28. response_serializer=proto_dot_ocr__pb2.OcrResponse.SerializeToString,
  29. ),
  30. }
  31. generic_handler = grpc.method_handlers_generic_handler(
  32. 'proto.Ocr', rpc_method_handlers)
  33. server.add_generic_rpc_handlers((generic_handler,))
  34. # This class is part of an EXPERIMENTAL API.
  35. class Ocr(object):
  36. """Missing associated documentation comment in .proto file"""
  37. @staticmethod
  38. def Ocr(request,
  39. target,
  40. options=(),
  41. channel_credentials=None,
  42. call_credentials=None,
  43. compression=None,
  44. wait_for_ready=None,
  45. timeout=None,
  46. metadata=None):
  47. return grpc.experimental.unary_unary(request, target, '/proto.Ocr/Ocr',
  48. proto_dot_ocr__pb2.OcrRequest.SerializeToString,
  49. proto_dot_ocr__pb2.OcrResponse.FromString,
  50. options, channel_credentials,
  51. call_credentials, compression, wait_for_ready, timeout, metadata)