Packages
snakepit
0.3.2
0.13.0
0.12.0
0.11.1
0.11.0
0.10.1
0.10.0
0.9.1
0.9.0
0.8.9
0.8.8
0.8.7
0.8.6
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.7
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.11
0.6.10
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.2.1
0.2.0
0.1.2
0.1.1
0.1.0
High-performance pooler and session manager for external language integrations. Supports Python, Node.js, Ruby, and more with gRPC streaming, session management, and production-ready process cleanup.
Current section
Files
Jump to
Current section
Files
priv/python/snakepit_bridge/grpc/snakepit_pb2_grpc.py
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings
from . import snakepit_pb2 as snakepit__pb2
GRPC_GENERATED_VERSION = '1.73.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in snakepit_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
class SnakepitBridgeStub(object):
"""Core gRPC bridge service for external process communication
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Execute = channel.unary_unary(
'/snakepit.SnakepitBridge/Execute',
request_serializer=snakepit__pb2.ExecuteRequest.SerializeToString,
response_deserializer=snakepit__pb2.ExecuteResponse.FromString,
_registered_method=True)
self.ExecuteStream = channel.unary_stream(
'/snakepit.SnakepitBridge/ExecuteStream',
request_serializer=snakepit__pb2.ExecuteRequest.SerializeToString,
response_deserializer=snakepit__pb2.StreamResponse.FromString,
_registered_method=True)
self.ExecuteInSession = channel.unary_unary(
'/snakepit.SnakepitBridge/ExecuteInSession',
request_serializer=snakepit__pb2.SessionRequest.SerializeToString,
response_deserializer=snakepit__pb2.ExecuteResponse.FromString,
_registered_method=True)
self.ExecuteInSessionStream = channel.unary_stream(
'/snakepit.SnakepitBridge/ExecuteInSessionStream',
request_serializer=snakepit__pb2.SessionRequest.SerializeToString,
response_deserializer=snakepit__pb2.StreamResponse.FromString,
_registered_method=True)
self.Health = channel.unary_unary(
'/snakepit.SnakepitBridge/Health',
request_serializer=snakepit__pb2.HealthRequest.SerializeToString,
response_deserializer=snakepit__pb2.HealthResponse.FromString,
_registered_method=True)
self.GetInfo = channel.unary_unary(
'/snakepit.SnakepitBridge/GetInfo',
request_serializer=snakepit__pb2.InfoRequest.SerializeToString,
response_deserializer=snakepit__pb2.InfoResponse.FromString,
_registered_method=True)
class SnakepitBridgeServicer(object):
"""Core gRPC bridge service for external process communication
"""
def Execute(self, request, context):
"""Simple request/response (existing functionality)
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ExecuteStream(self, request, context):
"""Server streaming (new: progressive results)
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ExecuteInSession(self, request, context):
"""Session management
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ExecuteInSessionStream(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Health(self, request, context):
"""Health check
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetInfo(self, request, context):
"""Worker info and capabilities
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_SnakepitBridgeServicer_to_server(servicer, server):
rpc_method_handlers = {
'Execute': grpc.unary_unary_rpc_method_handler(
servicer.Execute,
request_deserializer=snakepit__pb2.ExecuteRequest.FromString,
response_serializer=snakepit__pb2.ExecuteResponse.SerializeToString,
),
'ExecuteStream': grpc.unary_stream_rpc_method_handler(
servicer.ExecuteStream,
request_deserializer=snakepit__pb2.ExecuteRequest.FromString,
response_serializer=snakepit__pb2.StreamResponse.SerializeToString,
),
'ExecuteInSession': grpc.unary_unary_rpc_method_handler(
servicer.ExecuteInSession,
request_deserializer=snakepit__pb2.SessionRequest.FromString,
response_serializer=snakepit__pb2.ExecuteResponse.SerializeToString,
),
'ExecuteInSessionStream': grpc.unary_stream_rpc_method_handler(
servicer.ExecuteInSessionStream,
request_deserializer=snakepit__pb2.SessionRequest.FromString,
response_serializer=snakepit__pb2.StreamResponse.SerializeToString,
),
'Health': grpc.unary_unary_rpc_method_handler(
servicer.Health,
request_deserializer=snakepit__pb2.HealthRequest.FromString,
response_serializer=snakepit__pb2.HealthResponse.SerializeToString,
),
'GetInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetInfo,
request_deserializer=snakepit__pb2.InfoRequest.FromString,
response_serializer=snakepit__pb2.InfoResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'snakepit.SnakepitBridge', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('snakepit.SnakepitBridge', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class SnakepitBridge(object):
"""Core gRPC bridge service for external process communication
"""
@staticmethod
def Execute(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/snakepit.SnakepitBridge/Execute',
snakepit__pb2.ExecuteRequest.SerializeToString,
snakepit__pb2.ExecuteResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def ExecuteStream(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/snakepit.SnakepitBridge/ExecuteStream',
snakepit__pb2.ExecuteRequest.SerializeToString,
snakepit__pb2.StreamResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def ExecuteInSession(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/snakepit.SnakepitBridge/ExecuteInSession',
snakepit__pb2.SessionRequest.SerializeToString,
snakepit__pb2.ExecuteResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def ExecuteInSessionStream(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/snakepit.SnakepitBridge/ExecuteInSessionStream',
snakepit__pb2.SessionRequest.SerializeToString,
snakepit__pb2.StreamResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Health(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/snakepit.SnakepitBridge/Health',
snakepit__pb2.HealthRequest.SerializeToString,
snakepit__pb2.HealthResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetInfo(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/snakepit.SnakepitBridge/GetInfo',
snakepit__pb2.InfoRequest.SerializeToString,
snakepit__pb2.InfoResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)