Python grpc.beta() Examples

The following are 30 code examples of grpc.beta(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module grpc , or try the search function .
Example #1
Source File: networkserver_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_NetworkServerManager_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('networkserver.NetworkServerManager', 'GetStatus'): StatusRequest.SerializeToString,
    }
    response_deserializers = {
      ('networkserver.NetworkServerManager', 'GetStatus'): Status.FromString,
    }
    cardinalities = {
      'GetStatus': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'networkserver.NetworkServerManager', cardinalities, options=stub_options) 
Example #2
Source File: actions_pb2.py    From marvin-python-toolbox with Apache License 2.0 6 votes vote down vote up
def beta_create_BatchActionHandler_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('BatchActionHandler', '_health_check'): HealthCheckRequest.FromString,
      ('BatchActionHandler', '_remote_execute'): BatchActionRequest.FromString,
      ('BatchActionHandler', '_remote_reload'): ReloadRequest.FromString,
    }
    response_serializers = {
      ('BatchActionHandler', '_health_check'): HealthCheckResponse.SerializeToString,
      ('BatchActionHandler', '_remote_execute'): BatchActionResponse.SerializeToString,
      ('BatchActionHandler', '_remote_reload'): ReloadResponse.SerializeToString,
    }
    method_implementations = {
      ('BatchActionHandler', '_health_check'): face_utilities.unary_unary_inline(servicer._health_check),
      ('BatchActionHandler', '_remote_execute'): face_utilities.unary_unary_inline(servicer._remote_execute),
      ('BatchActionHandler', '_remote_reload'): face_utilities.unary_unary_inline(servicer._remote_reload),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #3
Source File: actions_pb2.py    From marvin-python-toolbox with Apache License 2.0 6 votes vote down vote up
def beta_create_OnlineActionHandler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('OnlineActionHandler', '_health_check'): HealthCheckRequest.SerializeToString,
      ('OnlineActionHandler', '_remote_execute'): OnlineActionRequest.SerializeToString,
      ('OnlineActionHandler', '_remote_reload'): ReloadRequest.SerializeToString,
    }
    response_deserializers = {
      ('OnlineActionHandler', '_health_check'): HealthCheckResponse.FromString,
      ('OnlineActionHandler', '_remote_execute'): OnlineActionResponse.FromString,
      ('OnlineActionHandler', '_remote_reload'): ReloadResponse.FromString,
    }
    cardinalities = {
      '_health_check': cardinality.Cardinality.UNARY_UNARY,
      '_remote_execute': cardinality.Cardinality.UNARY_UNARY,
      '_remote_reload': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'OnlineActionHandler', cardinalities, options=stub_options) 
Example #4
Source File: command_line_pb2.py    From python-grpc with Apache License 2.0 6 votes vote down vote up
def beta_create_CommandLine_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('command_line.CommandLine', 'Echo'): CommandRequest.FromString,
    }
    response_serializers = {
      ('command_line.CommandLine', 'Echo'): CommandResponse.SerializeToString,
    }
    method_implementations = {
      ('command_line.CommandLine', 'Echo'): face_utilities.unary_unary_inline(servicer.Echo),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #5
Source File: command_line_pb2.py    From python-grpc with Apache License 2.0 6 votes vote down vote up
def beta_create_CommandLine_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('command_line.CommandLine', 'Echo'): CommandRequest.SerializeToString,
    }
    response_deserializers = {
      ('command_line.CommandLine', 'Echo'): CommandResponse.FromString,
    }
    cardinalities = {
      'Echo': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'command_line.CommandLine', cardinalities, options=stub_options) 
Example #6
Source File: Health_pb2.py    From predixpy with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def beta_create_Health_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('grpc.health.v1.Health', 'Check'): HealthCheckRequest.FromString,
    }
    response_serializers = {
      ('grpc.health.v1.Health', 'Check'): HealthCheckResponse.SerializeToString,
    }
    method_implementations = {
      ('grpc.health.v1.Health', 'Check'): face_utilities.unary_unary_inline(servicer.Check),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #7
Source File: Health_pb2.py    From predixpy with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def beta_create_Health_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('grpc.health.v1.Health', 'Check'): HealthCheckRequest.SerializeToString,
    }
    response_deserializers = {
      ('grpc.health.v1.Health', 'Check'): HealthCheckResponse.FromString,
    }
    cardinalities = {
      'Check': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'grpc.health.v1.Health', cardinalities, options=stub_options) 
Example #8
Source File: EventHub_pb2.py    From predixpy with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def beta_create_Publisher_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('predix.eventhub.Publisher', 'send'): PublishRequest.FromString,
    }
    response_serializers = {
      ('predix.eventhub.Publisher', 'send'): PublishResponse.SerializeToString,
    }
    method_implementations = {
      ('predix.eventhub.Publisher', 'send'): face_utilities.stream_stream_inline(servicer.send),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #9
Source File: EventHub_pb2.py    From predixpy with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def beta_create_Publisher_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('predix.eventhub.Publisher', 'send'): PublishRequest.SerializeToString,
    }
    response_deserializers = {
      ('predix.eventhub.Publisher', 'send'): PublishResponse.FromString,
    }
    cardinalities = {
      'send': cardinality.Cardinality.STREAM_STREAM,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'predix.eventhub.Publisher', cardinalities, options=stub_options) 
Example #10
Source File: prediction_service_pb2.py    From Make_Money_with_Tensorflow with GNU General Public License v3.0 6 votes vote down vote up
def beta_create_PredictionService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): PredictRequest.FromString,
    }
    response_serializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): PredictResponse.SerializeToString,
    }
    method_implementations = {
      ('tensorflow.serving.PredictionService', 'Predict'): face_utilities.unary_unary_inline(servicer.Predict),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #11
Source File: calculator_pb2.py    From basic-grpc-python with MIT License 6 votes vote down vote up
def beta_create_Calculator_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('Calculator', 'SquareRoot'): Number.FromString,
    }
    response_serializers = {
      ('Calculator', 'SquareRoot'): Number.SerializeToString,
    }
    method_implementations = {
      ('Calculator', 'SquareRoot'): face_utilities.unary_unary_inline(servicer.SquareRoot),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #12
Source File: calculator_pb2.py    From basic-grpc-python with MIT License 6 votes vote down vote up
def beta_create_Calculator_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('Calculator', 'SquareRoot'): Number.SerializeToString,
    }
    response_deserializers = {
      ('Calculator', 'SquareRoot'): Number.FromString,
    }
    cardinalities = {
      'SquareRoot': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'Calculator', cardinalities, options=stub_options) 
Example #13
Source File: ServerSideExtension_pb2.py    From qlik-py-tools with MIT License 6 votes vote down vote up
def beta_create_Connector_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('qlik.sse.Connector', 'EvaluateScript'): BundledRows.FromString,
      ('qlik.sse.Connector', 'ExecuteFunction'): BundledRows.FromString,
      ('qlik.sse.Connector', 'GetCapabilities'): Empty.FromString,
    }
    response_serializers = {
      ('qlik.sse.Connector', 'EvaluateScript'): BundledRows.SerializeToString,
      ('qlik.sse.Connector', 'ExecuteFunction'): BundledRows.SerializeToString,
      ('qlik.sse.Connector', 'GetCapabilities'): Capabilities.SerializeToString,
    }
    method_implementations = {
      ('qlik.sse.Connector', 'EvaluateScript'): face_utilities.stream_stream_inline(servicer.EvaluateScript),
      ('qlik.sse.Connector', 'ExecuteFunction'): face_utilities.stream_stream_inline(servicer.ExecuteFunction),
      ('qlik.sse.Connector', 'GetCapabilities'): face_utilities.unary_unary_inline(servicer.GetCapabilities),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #14
Source File: ServerSideExtension_pb2.py    From qlik-py-tools with MIT License 6 votes vote down vote up
def beta_create_Connector_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('qlik.sse.Connector', 'EvaluateScript'): BundledRows.SerializeToString,
      ('qlik.sse.Connector', 'ExecuteFunction'): BundledRows.SerializeToString,
      ('qlik.sse.Connector', 'GetCapabilities'): Empty.SerializeToString,
    }
    response_deserializers = {
      ('qlik.sse.Connector', 'EvaluateScript'): BundledRows.FromString,
      ('qlik.sse.Connector', 'ExecuteFunction'): BundledRows.FromString,
      ('qlik.sse.Connector', 'GetCapabilities'): Capabilities.FromString,
    }
    cardinalities = {
      'EvaluateScript': cardinality.Cardinality.STREAM_STREAM,
      'ExecuteFunction': cardinality.Cardinality.STREAM_STREAM,
      'GetCapabilities': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'qlik.sse.Connector', cardinalities, options=stub_options) 
Example #15
Source File: networkserver_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_NetworkServerManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('networkserver.NetworkServerManager', 'GetStatus'): StatusRequest.FromString,
    }
    response_serializers = {
      ('networkserver.NetworkServerManager', 'GetStatus'): Status.SerializeToString,
    }
    method_implementations = {
      ('networkserver.NetworkServerManager', 'GetStatus'): face_utilities.unary_unary_inline(servicer.GetStatus),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #16
Source File: EventHub_pb2.py    From predixpy with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def beta_create_Subscriber_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('predix.eventhub.Subscriber', 'receive'): SubscriptionRequest.FromString,
      ('predix.eventhub.Subscriber', 'receiveWithAcks'): SubscriptionResponse.FromString,
      ('predix.eventhub.Subscriber', 'subscribe'): SubscriptionAcks.FromString,
    }
    response_serializers = {
      ('predix.eventhub.Subscriber', 'receive'): Message.SerializeToString,
      ('predix.eventhub.Subscriber', 'receiveWithAcks'): Message.SerializeToString,
      ('predix.eventhub.Subscriber', 'subscribe'): SubscriptionMessage.SerializeToString,
    }
    method_implementations = {
      ('predix.eventhub.Subscriber', 'receive'): face_utilities.unary_stream_inline(servicer.receive),
      ('predix.eventhub.Subscriber', 'receiveWithAcks'): face_utilities.stream_stream_inline(servicer.receiveWithAcks),
      ('predix.eventhub.Subscriber', 'subscribe'): face_utilities.stream_stream_inline(servicer.subscribe),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #17
Source File: device_address_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_DevAddrManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('lorawan.DevAddrManager', 'GetDevAddr'): DevAddrRequest.FromString,
      ('lorawan.DevAddrManager', 'GetPrefixes'): PrefixesRequest.FromString,
    }
    response_serializers = {
      ('lorawan.DevAddrManager', 'GetDevAddr'): DevAddrResponse.SerializeToString,
      ('lorawan.DevAddrManager', 'GetPrefixes'): PrefixesResponse.SerializeToString,
    }
    method_implementations = {
      ('lorawan.DevAddrManager', 'GetDevAddr'): face_utilities.unary_unary_inline(servicer.GetDevAddr),
      ('lorawan.DevAddrManager', 'GetPrefixes'): face_utilities.unary_unary_inline(servicer.GetPrefixes),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #18
Source File: device_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_DeviceManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('lorawan.DeviceManager', 'DeleteDevice'): DeviceIdentifier.FromString,
      ('lorawan.DeviceManager', 'GetDevice'): DeviceIdentifier.FromString,
      ('lorawan.DeviceManager', 'SetDevice'): Device.FromString,
    }
    response_serializers = {
      ('lorawan.DeviceManager', 'DeleteDevice'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ('lorawan.DeviceManager', 'GetDevice'): Device.SerializeToString,
      ('lorawan.DeviceManager', 'SetDevice'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
    }
    method_implementations = {
      ('lorawan.DeviceManager', 'DeleteDevice'): face_utilities.unary_unary_inline(servicer.DeleteDevice),
      ('lorawan.DeviceManager', 'GetDevice'): face_utilities.unary_unary_inline(servicer.GetDevice),
      ('lorawan.DeviceManager', 'SetDevice'): face_utilities.unary_unary_inline(servicer.SetDevice),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #19
Source File: device_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_DeviceManager_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('lorawan.DeviceManager', 'DeleteDevice'): DeviceIdentifier.SerializeToString,
      ('lorawan.DeviceManager', 'GetDevice'): DeviceIdentifier.SerializeToString,
      ('lorawan.DeviceManager', 'SetDevice'): Device.SerializeToString,
    }
    response_deserializers = {
      ('lorawan.DeviceManager', 'DeleteDevice'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('lorawan.DeviceManager', 'GetDevice'): Device.FromString,
      ('lorawan.DeviceManager', 'SetDevice'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
    }
    cardinalities = {
      'DeleteDevice': cardinality.Cardinality.UNARY_UNARY,
      'GetDevice': cardinality.Cardinality.UNARY_UNARY,
      'SetDevice': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'lorawan.DeviceManager', cardinalities, options=stub_options) 
Example #20
Source File: handler_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_Handler_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('handler.Handler', 'Activate'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.FromString,
      ('handler.Handler', 'ActivationChallenge'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.ActivationChallengeRequest.FromString,
    }
    response_serializers = {
      ('handler.Handler', 'Activate'): DeviceActivationResponse.SerializeToString,
      ('handler.Handler', 'ActivationChallenge'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.ActivationChallengeResponse.SerializeToString,
    }
    method_implementations = {
      ('handler.Handler', 'Activate'): face_utilities.unary_unary_inline(servicer.Activate),
      ('handler.Handler', 'ActivationChallenge'): face_utilities.unary_unary_inline(servicer.ActivationChallenge),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #21
Source File: handler_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_Handler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('handler.Handler', 'Activate'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.SerializeToString,
      ('handler.Handler', 'ActivationChallenge'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.ActivationChallengeRequest.SerializeToString,
    }
    response_deserializers = {
      ('handler.Handler', 'Activate'): DeviceActivationResponse.FromString,
      ('handler.Handler', 'ActivationChallenge'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.ActivationChallengeResponse.FromString,
    }
    cardinalities = {
      'Activate': cardinality.Cardinality.UNARY_UNARY,
      'ActivationChallenge': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'handler.Handler', cardinalities, options=stub_options) 
Example #22
Source File: handler_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_HandlerManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('handler.HandlerManager', 'GetStatus'): StatusRequest.FromString,
    }
    response_serializers = {
      ('handler.HandlerManager', 'GetStatus'): Status.SerializeToString,
    }
    method_implementations = {
      ('handler.HandlerManager', 'GetStatus'): face_utilities.unary_unary_inline(servicer.GetStatus),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #23
Source File: broker_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_BrokerManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('broker.BrokerManager', 'GetStatus'): StatusRequest.FromString,
      ('broker.BrokerManager', 'RegisterApplicationHandler'): ApplicationHandlerRegistration.FromString,
    }
    response_serializers = {
      ('broker.BrokerManager', 'GetStatus'): Status.SerializeToString,
      ('broker.BrokerManager', 'RegisterApplicationHandler'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
    }
    method_implementations = {
      ('broker.BrokerManager', 'GetStatus'): face_utilities.unary_unary_inline(servicer.GetStatus),
      ('broker.BrokerManager', 'RegisterApplicationHandler'): face_utilities.unary_unary_inline(servicer.RegisterApplicationHandler),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #24
Source File: broker_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_BrokerManager_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('broker.BrokerManager', 'GetStatus'): StatusRequest.SerializeToString,
      ('broker.BrokerManager', 'RegisterApplicationHandler'): ApplicationHandlerRegistration.SerializeToString,
    }
    response_deserializers = {
      ('broker.BrokerManager', 'GetStatus'): Status.FromString,
      ('broker.BrokerManager', 'RegisterApplicationHandler'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
    }
    cardinalities = {
      'GetStatus': cardinality.Cardinality.UNARY_UNARY,
      'RegisterApplicationHandler': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'broker.BrokerManager', cardinalities, options=stub_options) 
Example #25
Source File: router_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_RouterManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('router.RouterManager', 'GatewayStatus'): GatewayStatusRequest.FromString,
      ('router.RouterManager', 'GetStatus'): StatusRequest.FromString,
    }
    response_serializers = {
      ('router.RouterManager', 'GatewayStatus'): GatewayStatusResponse.SerializeToString,
      ('router.RouterManager', 'GetStatus'): Status.SerializeToString,
    }
    method_implementations = {
      ('router.RouterManager', 'GatewayStatus'): face_utilities.unary_unary_inline(servicer.GatewayStatus),
      ('router.RouterManager', 'GetStatus'): face_utilities.unary_unary_inline(servicer.GetStatus),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #26
Source File: router_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_RouterManager_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('router.RouterManager', 'GatewayStatus'): GatewayStatusRequest.SerializeToString,
      ('router.RouterManager', 'GetStatus'): StatusRequest.SerializeToString,
    }
    response_deserializers = {
      ('router.RouterManager', 'GatewayStatus'): GatewayStatusResponse.FromString,
      ('router.RouterManager', 'GetStatus'): Status.FromString,
    }
    cardinalities = {
      'GatewayStatus': cardinality.Cardinality.UNARY_UNARY,
      'GetStatus': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'router.RouterManager', cardinalities, options=stub_options) 
Example #27
Source File: grpc_service_pb2.py    From python-compat-runtime with Apache License 2.0 6 votes vote down vote up
def beta_create_CallHandler_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('apphosting.tools.devappserver2.CallHandler', 'HandleCall'): Request.FromString,
    }
    response_serializers = {
      ('apphosting.tools.devappserver2.CallHandler', 'HandleCall'): Response.SerializeToString,
    }
    method_implementations = {
      ('apphosting.tools.devappserver2.CallHandler', 'HandleCall'): face_utilities.unary_unary_inline(servicer.HandleCall),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #28
Source File: grpc_service_pb2.py    From python-compat-runtime with Apache License 2.0 6 votes vote down vote up
def beta_create_CallHandler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('apphosting.tools.devappserver2.CallHandler', 'HandleCall'): Request.SerializeToString,
    }
    response_deserializers = {
      ('apphosting.tools.devappserver2.CallHandler', 'HandleCall'): Response.FromString,
    }
    cardinalities = {
      'HandleCall': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'apphosting.tools.devappserver2.CallHandler', cardinalities, options=stub_options) 
Example #29
Source File: helloworld_pb2.py    From proto_parser with GNU General Public License v3.0 6 votes vote down vote up
def beta_create_Greeter_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('hello_world.Greeter', 'SayHello'): HelloRequest.FromString,
    }
    response_serializers = {
      ('hello_world.Greeter', 'SayHello'): HelloReply.SerializeToString,
    }
    method_implementations = {
      ('hello_world.Greeter', 'SayHello'): face_utilities.unary_unary_inline(servicer.SayHello),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options) 
Example #30
Source File: helloworld_pb2.py    From proto_parser with GNU General Public License v3.0 6 votes vote down vote up
def beta_create_Greeter_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('hello_world.Greeter', 'SayHello'): HelloRequest.SerializeToString,
    }
    response_deserializers = {
      ('hello_world.Greeter', 'SayHello'): HelloReply.FromString,
    }
    cardinalities = {
      'SayHello': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'hello_world.Greeter', cardinalities, options=stub_options)