Python grpc.beta.implementations.dynamic_stub() Examples

The following are 30 code examples of grpc.beta.implementations.dynamic_stub(). 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.beta.implementations , or try the search function .
Example #1
Source File: worldhello_pb2.py    From sea with MIT License 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 = {
      ('worldhello.Greeter', 'SayHello'): HelloRequest.SerializeToString,
      ('worldhello.Greeter', 'SayHelloAgain'): HelloRequest.SerializeToString,
    }
    response_deserializers = {
      ('worldhello.Greeter', 'SayHello'): HelloReply.FromString,
      ('worldhello.Greeter', 'SayHelloAgain'): HelloReply.FromString,
    }
    cardinalities = {
      'SayHello': cardinality.Cardinality.UNARY_UNARY,
      'SayHelloAgain': 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, 'worldhello.Greeter', cardinalities, options=stub_options) 
Example #2
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) 
Example #3
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 #4
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 #5
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 #6
Source File: handler_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_HandlerManager_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.HandlerManager', 'GetStatus'): StatusRequest.SerializeToString,
    }
    response_deserializers = {
      ('handler.HandlerManager', '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, 'handler.HandlerManager', cardinalities, options=stub_options) 
Example #7
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 #8
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 #9
Source File: device_address_pb2.py    From python-app-sdk with MIT License 6 votes vote down vote up
def beta_create_DevAddrManager_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.DevAddrManager', 'GetDevAddr'): DevAddrRequest.SerializeToString,
      ('lorawan.DevAddrManager', 'GetPrefixes'): PrefixesRequest.SerializeToString,
    }
    response_deserializers = {
      ('lorawan.DevAddrManager', 'GetDevAddr'): DevAddrResponse.FromString,
      ('lorawan.DevAddrManager', 'GetPrefixes'): PrefixesResponse.FromString,
    }
    cardinalities = {
      'GetDevAddr': cardinality.Cardinality.UNARY_UNARY,
      'GetPrefixes': 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.DevAddrManager', cardinalities, options=stub_options) 
Example #10
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 #11
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 #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: EventHub_pb2.py    From predixpy with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def beta_create_Subscriber_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.Subscriber', 'receive'): SubscriptionRequest.SerializeToString,
      ('predix.eventhub.Subscriber', 'receiveWithAcks'): SubscriptionResponse.SerializeToString,
      ('predix.eventhub.Subscriber', 'subscribe'): SubscriptionAcks.SerializeToString,
    }
    response_deserializers = {
      ('predix.eventhub.Subscriber', 'receive'): Message.FromString,
      ('predix.eventhub.Subscriber', 'receiveWithAcks'): Message.FromString,
      ('predix.eventhub.Subscriber', 'subscribe'): SubscriptionMessage.FromString,
    }
    cardinalities = {
      'receive': cardinality.Cardinality.UNARY_STREAM,
      'receiveWithAcks': cardinality.Cardinality.STREAM_STREAM,
      'subscribe': 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.Subscriber', cardinalities, options=stub_options) 
Example #14
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 #15
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 #16
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 #17
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 #18
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_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 = {
      ('tensorflow.serving.PredictionService', 'Predict'): PredictRequest.SerializeToString,
    }
    response_deserializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): PredictResponse.FromString,
    }
    cardinalities = {
      'Predict': 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, 'tensorflow.serving.PredictionService', cardinalities, options=stub_options) 
Example #19
Source File: clusterspecgenerator_pb2.py    From hops-tensorflow with Apache License 2.0 6 votes vote down vote up
def beta_create_ClusterSpecGenerator_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 = {
      ('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): GetClusterSpecRequest.SerializeToString,
      ('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): RegisterContainerRequest.SerializeToString,
    }
    response_deserializers = {
      ('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): GetClusterSpecReply.FromString,
      ('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): RegisterContainerReply.FromString,
    }
    cardinalities = {
      'GetClusterSpec': cardinality.Cardinality.UNARY_UNARY,
      'RegisterContainer': 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, 'clusterspecgenerator.ClusterSpecGenerator', cardinalities, options=stub_options) 
Example #20
Source File: helloworld_pb2.py    From sea with MIT License 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 = {
      ('helloworld.Greeter', 'SayHello'): HelloRequest.SerializeToString,
    }
    response_deserializers = {
      ('helloworld.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, 'helloworld.Greeter', cardinalities, options=stub_options) 
Example #21
Source File: prediction_service_pb2.py    From text-antispam with MIT License 6 votes vote down vote up
def beta_create_PredictionService_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 = {
      ('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictRequest.SerializeToString,
    }
    response_deserializers = {
      ('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictResponse.FromString,
    }
    cardinalities = {
      'Predict': 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, 'tensorflow.serving.PredictionService', cardinalities, options=stub_options) 
Example #22
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 #23
Source File: actions_pb2.py    From marvin-python-toolbox with Apache License 2.0 6 votes vote down vote up
def beta_create_BatchActionHandler_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 = {
      ('BatchActionHandler', '_health_check'): HealthCheckRequest.SerializeToString,
      ('BatchActionHandler', '_remote_execute'): BatchActionRequest.SerializeToString,
      ('BatchActionHandler', '_remote_reload'): ReloadRequest.SerializeToString,
    }
    response_deserializers = {
      ('BatchActionHandler', '_health_check'): HealthCheckResponse.FromString,
      ('BatchActionHandler', '_remote_execute'): BatchActionResponse.FromString,
      ('BatchActionHandler', '_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, 'BatchActionHandler', cardinalities, options=stub_options) 
Example #24
Source File: model_service_pb2.py    From Gather-Deployment with MIT License 6 votes vote down vote up
def beta_create_ModelService_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 = {
      ('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.SerializeToString,
    }
    response_deserializers = {
      ('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.FromString,
    }
    cardinalities = {
      'GetModelStatus': 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, 'tensorflow.serving.ModelService', cardinalities, options=stub_options) 
Example #25
Source File: prediction_service_pb2.py    From cloud-ml-sdk with Apache License 2.0 5 votes vote down vote up
def beta_create_PredictionService_stub(channel,
                                       host=None,
                                       metadata_transformer=None,
                                       pool=None,
                                       pool_size=None):
  request_serializers = {
      ('tensorflow.serving.PredictionService', 'Predict'):
      predict__pb2.PredictRequest.SerializeToString,
  }
  response_deserializers = {
      ('tensorflow.serving.PredictionService', 'Predict'):
      predict__pb2.PredictResponse.FromString,
  }
  cardinalities = {'Predict': 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,
      'tensorflow.serving.PredictionService',
      cardinalities,
      options=stub_options)
# @@protoc_insertion_point(module_scope) 
Example #26
Source File: prediction_service_pb2.py    From Machine-Learning-with-TensorFlow-1.x with MIT License 5 votes vote down vote up
def beta_create_PredictionService_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 = {
    ('tensorflow.serving.PredictionService', 'Classify'): tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationRequest.SerializeToString,
    ('tensorflow.serving.PredictionService', 'GetModelMetadata'): tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataRequest.SerializeToString,
    ('tensorflow.serving.PredictionService', 'Predict'): tensorflow__serving_dot_apis_dot_predict__pb2.PredictRequest.SerializeToString,
    ('tensorflow.serving.PredictionService', 'Regress'): tensorflow__serving_dot_apis_dot_regression__pb2.RegressionRequest.SerializeToString,
  }
  response_deserializers = {
    ('tensorflow.serving.PredictionService', 'Classify'): tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationResponse.FromString,
    ('tensorflow.serving.PredictionService', 'GetModelMetadata'): tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataResponse.FromString,
    ('tensorflow.serving.PredictionService', 'Predict'): tensorflow__serving_dot_apis_dot_predict__pb2.PredictResponse.FromString,
    ('tensorflow.serving.PredictionService', 'Regress'): tensorflow__serving_dot_apis_dot_regression__pb2.RegressionResponse.FromString,
  }
  cardinalities = {
    'Classify': cardinality.Cardinality.UNARY_UNARY,
    'GetModelMetadata': cardinality.Cardinality.UNARY_UNARY,
    'Predict': cardinality.Cardinality.UNARY_UNARY,
    'Regress': 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, 'tensorflow.serving.PredictionService', cardinalities, options=stub_options)
# @@protoc_insertion_point(module_scope) 
Example #27
Source File: router_pb2.py    From python-app-sdk with MIT License 5 votes vote down vote up
def beta_create_Router_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.Router', 'Activate'): DeviceActivationRequest.SerializeToString,
      ('router.Router', 'GatewayStatus'): github__com_dot_TheThingsNetwork_dot_api_dot_gateway_dot_gateway__pb2.Status.SerializeToString,
      ('router.Router', 'Subscribe'): SubscribeRequest.SerializeToString,
      ('router.Router', 'Uplink'): UplinkMessage.SerializeToString,
    }
    response_deserializers = {
      ('router.Router', 'Activate'): DeviceActivationResponse.FromString,
      ('router.Router', 'GatewayStatus'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('router.Router', 'Subscribe'): DownlinkMessage.FromString,
      ('router.Router', 'Uplink'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
    }
    cardinalities = {
      'Activate': cardinality.Cardinality.UNARY_UNARY,
      'GatewayStatus': cardinality.Cardinality.STREAM_UNARY,
      'Subscribe': cardinality.Cardinality.UNARY_STREAM,
      'Uplink': cardinality.Cardinality.STREAM_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.Router', cardinalities, options=stub_options) 
Example #28
Source File: broker_pb2.py    From python-app-sdk with MIT License 5 votes vote down vote up
def beta_create_Broker_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.Broker', 'Activate'): DeviceActivationRequest.SerializeToString,
      ('broker.Broker', 'Associate'): UplinkMessage.SerializeToString,
      ('broker.Broker', 'Publish'): DownlinkMessage.SerializeToString,
      ('broker.Broker', 'Subscribe'): SubscribeRequest.SerializeToString,
    }
    response_deserializers = {
      ('broker.Broker', 'Activate'): DeviceActivationResponse.FromString,
      ('broker.Broker', 'Associate'): DownlinkMessage.FromString,
      ('broker.Broker', 'Publish'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('broker.Broker', 'Subscribe'): DeduplicatedUplinkMessage.FromString,
    }
    cardinalities = {
      'Activate': cardinality.Cardinality.UNARY_UNARY,
      'Associate': cardinality.Cardinality.STREAM_STREAM,
      'Publish': cardinality.Cardinality.STREAM_UNARY,
      'Subscribe': cardinality.Cardinality.UNARY_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, 'broker.Broker', cardinalities, options=stub_options) 
Example #29
Source File: hetr_pb2.py    From ngraph-python with Apache License 2.0 5 votes vote down vote up
def beta_create_Hetr_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 = {
      ('Hetr', 'BuildTransformer'): BuildTransformerRequest.SerializeToString,
      ('Hetr', 'Close'): CloseRequest.SerializeToString,
      ('Hetr', 'CloseTransformer'): CloseTransformerRequest.SerializeToString,
      ('Hetr', 'Computation'): ComputationRequest.SerializeToString,
      ('Hetr', 'FeedInput'): FeedInputRequest.SerializeToString,
      ('Hetr', 'GetResults'): GetResultsRequest.SerializeToString,
    }
    response_deserializers = {
      ('Hetr', 'BuildTransformer'): BuildTransformerReply.FromString,
      ('Hetr', 'Close'): CloseReply.FromString,
      ('Hetr', 'CloseTransformer'): CloseTransformerReply.FromString,
      ('Hetr', 'Computation'): ComputationReply.FromString,
      ('Hetr', 'FeedInput'): FeedInputReply.FromString,
      ('Hetr', 'GetResults'): GetResultsReply.FromString,
    }
    cardinalities = {
      'BuildTransformer': cardinality.Cardinality.UNARY_UNARY,
      'Close': cardinality.Cardinality.UNARY_UNARY,
      'CloseTransformer': cardinality.Cardinality.UNARY_UNARY,
      'Computation': cardinality.Cardinality.STREAM_UNARY,
      'FeedInput': cardinality.Cardinality.UNARY_UNARY,
      'GetResults': 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, 'Hetr', cardinalities, options=stub_options) 
Example #30
Source File: discovery_pb2.py    From python-app-sdk with MIT License 5 votes vote down vote up
def beta_create_Discovery_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 = {
      ('discovery.Discovery', 'AddMetadata'): MetadataRequest.SerializeToString,
      ('discovery.Discovery', 'Announce'): Announcement.SerializeToString,
      ('discovery.Discovery', 'DeleteMetadata'): MetadataRequest.SerializeToString,
      ('discovery.Discovery', 'Get'): GetRequest.SerializeToString,
      ('discovery.Discovery', 'GetAll'): GetServiceRequest.SerializeToString,
      ('discovery.Discovery', 'GetByAppEUI'): GetByAppEUIRequest.SerializeToString,
      ('discovery.Discovery', 'GetByAppID'): GetByAppIDRequest.SerializeToString,
      ('discovery.Discovery', 'GetByGatewayID'): GetByGatewayIDRequest.SerializeToString,
    }
    response_deserializers = {
      ('discovery.Discovery', 'AddMetadata'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('discovery.Discovery', 'Announce'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('discovery.Discovery', 'DeleteMetadata'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('discovery.Discovery', 'Get'): Announcement.FromString,
      ('discovery.Discovery', 'GetAll'): AnnouncementsResponse.FromString,
      ('discovery.Discovery', 'GetByAppEUI'): Announcement.FromString,
      ('discovery.Discovery', 'GetByAppID'): Announcement.FromString,
      ('discovery.Discovery', 'GetByGatewayID'): Announcement.FromString,
    }
    cardinalities = {
      'AddMetadata': cardinality.Cardinality.UNARY_UNARY,
      'Announce': cardinality.Cardinality.UNARY_UNARY,
      'DeleteMetadata': cardinality.Cardinality.UNARY_UNARY,
      'Get': cardinality.Cardinality.UNARY_UNARY,
      'GetAll': cardinality.Cardinality.UNARY_UNARY,
      'GetByAppEUI': cardinality.Cardinality.UNARY_UNARY,
      'GetByAppID': cardinality.Cardinality.UNARY_UNARY,
      'GetByGatewayID': 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, 'discovery.Discovery', cardinalities, options=stub_options)