How to use the grpclib.client function in grpclib

To help you get started, we’ve selected a few grpclib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vmagamedov / grpclib / tests / bombed_grpc.py View on Github external
def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Plaster = grpclib.client.UnaryUnaryMethod(
            channel,
            '/Bombed/Plaster',
            bombed_pb2.SavoysRequest,
            bombed_pb2.SavoysReply,
        )
        self.Benzine = grpclib.client.UnaryStreamMethod(
            channel,
            '/Bombed/Benzine',
            bombed_pb2.SavoysRequest,
            bombed_pb2.GoowyChunk,
        )
        self.Anginal = grpclib.client.StreamUnaryMethod(
            channel,
            '/Bombed/Anginal',
            bombed_pb2.UnyoungChunk,
            bombed_pb2.SavoysReply,
github vmagamedov / grpclib / tests / bombed_grpc.py View on Github external
bombed_pb2.SavoysRequest,
            bombed_pb2.SavoysReply,
        )
        self.Benzine = grpclib.client.UnaryStreamMethod(
            channel,
            '/Bombed/Benzine',
            bombed_pb2.SavoysRequest,
            bombed_pb2.GoowyChunk,
        )
        self.Anginal = grpclib.client.StreamUnaryMethod(
            channel,
            '/Bombed/Anginal',
            bombed_pb2.UnyoungChunk,
            bombed_pb2.SavoysReply,
        )
        self.Devilry = grpclib.client.StreamStreamMethod(
            channel,
            '/Bombed/Devilry',
            bombed_pb2.UnyoungChunk,
            bombed_pb2.GoowyChunk,
        )
github vmagamedov / grpclib / tests / dummy_grpc.py View on Github external
def __init__(self, channel: grpclib.client.Channel) -> None:
        self.UnaryUnary = grpclib.client.UnaryUnaryMethod(
            channel,
            '/dummy.DummyService/UnaryUnary',
            dummy_pb2.DummyRequest,
            dummy_pb2.DummyReply,
        )
        self.UnaryStream = grpclib.client.UnaryStreamMethod(
            channel,
            '/dummy.DummyService/UnaryStream',
            dummy_pb2.DummyRequest,
            dummy_pb2.DummyReply,
        )
        self.StreamUnary = grpclib.client.StreamUnaryMethod(
            channel,
            '/dummy.DummyService/StreamUnary',
            dummy_pb2.DummyRequest,
            dummy_pb2.DummyReply,
        )
        self.StreamStream = grpclib.client.StreamStreamMethod(
            channel,
            '/dummy.DummyService/StreamStream',
            dummy_pb2.DummyRequest,
            dummy_pb2.DummyReply,
        )
github vmagamedov / grpclib / grpclib / health / v1 / health_grpc.py View on Github external
def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Check = grpclib.client.UnaryUnaryMethod(
            channel,
            '/grpc.health.v1.Health/Check',
            grpclib.health.v1.health_pb2.HealthCheckRequest,
            grpclib.health.v1.health_pb2.HealthCheckResponse,
        )
        self.Watch = grpclib.client.UnaryStreamMethod(
            channel,
            '/grpc.health.v1.Health/Watch',
            grpclib.health.v1.health_pb2.HealthCheckRequest,
            grpclib.health.v1.health_pb2.HealthCheckResponse,
        )
github vmagamedov / grpclib / example / helloworld / helloworld_grpc.py View on Github external
def __init__(self, channel: grpclib.client.Channel) -> None:
        self.UnaryUnaryGreeting = grpclib.client.UnaryUnaryMethod(
            channel,
            '/helloworld.Greeter/UnaryUnaryGreeting',
            helloworld.helloworld_pb2.HelloRequest,
            helloworld.helloworld_pb2.HelloReply,
        )
        self.UnaryStreamGreeting = grpclib.client.UnaryStreamMethod(
            channel,
            '/helloworld.Greeter/UnaryStreamGreeting',
            helloworld.helloworld_pb2.HelloRequest,
            helloworld.helloworld_pb2.HelloReply,
        )
        self.StreamUnaryGreeting = grpclib.client.StreamUnaryMethod(
            channel,
            '/helloworld.Greeter/StreamUnaryGreeting',
            helloworld.helloworld_pb2.HelloRequest,
            helloworld.helloworld_pb2.HelloReply,
        )
        self.StreamStreamGreeting = grpclib.client.StreamStreamMethod(
            channel,
            '/helloworld.Greeter/StreamStreamGreeting',
            helloworld.helloworld_pb2.HelloRequest,
            helloworld.helloworld_pb2.HelloReply,
        )