当前位置: 首页>>代码示例>>Python>>正文


Python implementations.stub_options方法代码示例

本文整理汇总了Python中grpc.beta.implementations.stub_options方法的典型用法代码示例。如果您正苦于以下问题:Python implementations.stub_options方法的具体用法?Python implementations.stub_options怎么用?Python implementations.stub_options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在grpc.beta.implementations的用法示例。


在下文中一共展示了implementations.stub_options方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: beta_create_PredictionService_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:llSourcell,项目名称:Make_Money_with_Tensorflow,代码行数:19,代码来源:prediction_service_pb2.py

示例2: beta_create_Greeter_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:shanbay,项目名称:sea,代码行数:22,代码来源:worldhello_pb2.py

示例3: beta_create_Greeter_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:shanbay,项目名称:sea,代码行数:19,代码来源:helloworld_pb2.py

示例4: beta_create_PredictionService_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:tensorlayer,项目名称:text-antispam,代码行数:19,代码来源:prediction_service_pb2.py

示例5: beta_create_OnlineActionHandler_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:marvin-ai,项目名称:marvin-python-toolbox,代码行数:25,代码来源:actions_pb2.py

示例6: beta_create_BatchActionHandler_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:marvin-ai,项目名称:marvin-python-toolbox,代码行数:25,代码来源:actions_pb2.py

示例7: beta_create_ModelService_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:huseinzol05,项目名称:Gather-Deployment,代码行数:19,代码来源:model_service_pb2.py

示例8: beta_create_ClusterSpecGenerator_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:logicalclocks,项目名称:hops-tensorflow,代码行数:22,代码来源:clusterspecgenerator_pb2.py

示例9: beta_create_CommandLine_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:opentracing-contrib,项目名称:python-grpc,代码行数:19,代码来源:command_line_pb2.py

示例10: beta_create_Health_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:PredixDev,项目名称:predixpy,代码行数:19,代码来源:Health_pb2.py

示例11: beta_create_Publisher_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:PredixDev,项目名称:predixpy,代码行数:19,代码来源:EventHub_pb2.py

示例12: beta_create_Subscriber_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:PredixDev,项目名称:predixpy,代码行数:25,代码来源:EventHub_pb2.py

示例13: beta_create_Calculator_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:ramananbalakrishnan,项目名称:basic-grpc-python,代码行数:19,代码来源:calculator_pb2.py

示例14: beta_create_Connector_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:nabeel-oz,项目名称:qlik-py-tools,代码行数:25,代码来源:ServerSideExtension_pb2.py

示例15: beta_create_NetworkServerManager_stub

# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import stub_options [as 别名]
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) 
开发者ID:TheThingsNetwork,项目名称:python-app-sdk,代码行数:19,代码来源:networkserver_pb2.py


注:本文中的grpc.beta.implementations.stub_options方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。