Check this out gRPC Python Server Reflection
Refer to the GitHub reflection example
Reference implementation for reflection in gRPC Python.
Servicer handling RPCs for service statuses.
Enables server reflection on a server.
service_names – Iterable of fully-qualified service names available.
server – grpc.Server to which reflection service will be added.
pool – DescriptorPool object to use (descriptor_pool.Default() if None).
Reference implementation for reflection client in gRPC Python.
For usage instructions, see the Python Reflection documentation at
doc/python/server_reflection.md
.
A container and interface for receiving descriptors from a server’s Reflection service.
ProtoReflectionDescriptorDatabase takes a channel to a server with Reflection service, and provides an interface to retrieve the Reflection information. It implements the DescriptorDatabase interface.
It is typically used to feed a DescriptorPool instance.
channel (Channel)
Get list of full names of the registered services.
A list of strings corresponding to the names of the services.
Iterable[str]
Find a file descriptor by file name.
This function implements a DescriptorDatabase interface, and is typically not called directly; prefer using a DescriptorPool instead.
name (str) – The name of the file. Typically this is a relative path ending in “.proto”.
A FileDescriptorProto for the file.
KeyError – the file was not found.
FileDescriptorProto
Find the file containing the symbol, and return its file descriptor.
The symbol should be a fully qualified name including the file descriptor’s package and any containing messages. Some examples:
“some.package.name.Message”
“some.package.name.Message.NestedEnum”
“some.package.name.Message.some_field”
This function implements a DescriptorDatabase interface, and is typically not called directly; prefer using a DescriptorPool instead.
symbol (str) – The fully-qualified name of the symbol.
FileDescriptorProto for the file containing the symbol.
KeyError – the symbol was not found.
FileDescriptorProto
Find the field numbers used by all known extensions of extendee_name.
This function implements a DescriptorDatabase interface, and is typically not called directly; prefer using a DescriptorPool instead.
extendee_name (str) – fully-qualified name of the extended message type.
A list of field numbers used by all known extensions.
KeyError – The message type extendee_name was not found.
Iterable[int]
Find the file which defines an extension for the given message type and field number.
This function implements a DescriptorDatabase interface, and is typically not called directly; prefer using a DescriptorPool instead.
extendee_name (str) – fully-qualified name of the extended message type.
extension_number (int) – the number of the extension field.
FileDescriptorProto for the file containing the extension.
KeyError – The message or the extension number were not found.
FileDescriptorProto