Skip to content

Instantly share code, notes, and snippets.

View asher-pembroke's full-sized avatar

Asher Pembroke asher-pembroke

View GitHub Profile
@Harold2017
Harold2017 / client.py
Created March 15, 2019 09:29
python gRPC client side reflection
from grpc_reflection.v1alpha import reflection
def list_services(address):
channel = grpc.secure_channel(address, get_client_credentials())
stub = reflection._reflection_pb2_grpc.ServerReflectionStub(channel)
def gen():
yield reflection._reflection_pb2.ServerReflectionRequest(host=address, list_services='')