diff --git a/README.md b/README.md index e48acfe..390ca8a 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ import time import grpc +import wonderlandClient from wonderlandClient import ( new_client, Job, diff --git a/wonderlandClient/__init__.py b/wonderlandClient/__init__.py index fad6630..583ec2e 100644 --- a/wonderlandClient/__init__.py +++ b/wonderlandClient/__init__.py @@ -6,9 +6,9 @@ ) from .wonderland_pb2_grpc import ( - wonderlandServicer, - wonderlandStub, - add_wonderlandServicer_to_server + WonderlandServicer, + WonderlandStub, + add_WonderlandServicer_to_server ) from .util import ( diff --git a/wonderlandClient/util.py b/wonderlandClient/util.py index 00ecf78..85080b8 100644 --- a/wonderlandClient/util.py +++ b/wonderlandClient/util.py @@ -3,7 +3,7 @@ import grpc import yaml -from .wonderland_pb2_grpc import wonderlandStub +from .wonderland_pb2_grpc import WonderlandStub def new_client(): @@ -22,7 +22,7 @@ def new_client_from_path(config_path): ('grpc.max_receive_message_length', 1024 * 1024 * 1024), ) ) - return wonderlandStub(channel) + return WonderlandStub(channel) def load_config(config_path): diff --git a/wonderlandClient/wonderland_pb2_grpc.py b/wonderlandClient/wonderland_pb2_grpc.py index 3e02d17..9b4f2c5 100644 --- a/wonderlandClient/wonderland_pb2_grpc.py +++ b/wonderlandClient/wonderland_pb2_grpc.py @@ -4,7 +4,7 @@ import wonderlandClient.wonderland_pb2 as wonderland__pb2 -class wonderlandStub(object): +class WonderlandStub(object): # missing associated documentation comment in .proto file pass @@ -15,38 +15,38 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.CreateJob = channel.unary_unary( - '/wonderland/CreateJob', + '/Wonderland/CreateJob', request_serializer=wonderland__pb2.Job.SerializeToString, response_deserializer=wonderland__pb2.Job.FromString, ) self.GetJob = channel.unary_unary( - '/wonderland/GetJob', + '/Wonderland/GetJob', request_serializer=wonderland__pb2.RequestWithId.SerializeToString, response_deserializer=wonderland__pb2.Job.FromString, ) self.ListJobs = channel.unary_unary( - '/wonderland/ListJobs', + '/Wonderland/ListJobs', request_serializer=wonderland__pb2.ListJobsRequest.SerializeToString, response_deserializer=wonderland__pb2.ListOfJobs.FromString, ) self.ModifyJob = channel.unary_unary( - '/wonderland/ModifyJob', + '/Wonderland/ModifyJob', request_serializer=wonderland__pb2.Job.SerializeToString, response_deserializer=wonderland__pb2.Job.FromString, ) self.PullPendingJobs = channel.unary_unary( - '/wonderland/PullPendingJobs', + '/Wonderland/PullPendingJobs', request_serializer=wonderland__pb2.ListJobsRequest.SerializeToString, response_deserializer=wonderland__pb2.ListOfJobs.FromString, ) self.DeleteJob = channel.unary_unary( - '/wonderland/DeleteJob', + '/Wonderland/DeleteJob', request_serializer=wonderland__pb2.RequestWithId.SerializeToString, response_deserializer=wonderland__pb2.Job.FromString, ) -class wonderlandServicer(object): +class WonderlandServicer(object): # missing associated documentation comment in .proto file pass @@ -93,7 +93,7 @@ def DeleteJob(self, request, context): raise NotImplementedError('Method not implemented!') -def add_wonderlandServicer_to_server(servicer, server): +def add_WonderlandServicer_to_server(servicer, server): rpc_method_handlers = { 'CreateJob': grpc.unary_unary_rpc_method_handler( servicer.CreateJob, @@ -127,5 +127,5 @@ def add_wonderlandServicer_to_server(servicer, server): ), } generic_handler = grpc.method_handlers_generic_handler( - 'wonderland', rpc_method_handlers) + 'Wonderland', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))