fix broken link and move links to bottom

pull/19699/head
curiousjazz77 6 years ago committed by GitHub
parent 1194927905
commit e09e4d002d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 35
      doc/python/server_reflection.md

@ -1,14 +1,13 @@
# gRPC Python Server Reflection # gRPC Python Server Reflection
This document shows how to use gRPC Server Reflection in gRPC Python. This document shows how to use gRPC Server Reflection in gRPC Python.
Please see [C++ Server Reflection Tutorial](../server_reflection_tutorial.md) Please see [C++ Server Reflection Tutorial] for general information
for general information and more examples how to use server reflection. and more examples how to use server reflection.
## Enable server reflection in Python servers ## Enable server reflection in Python servers
gRPC Python Server Reflection is an add-on library. gRPC Python Server Reflection is an add-on library. To use it, first install
To use it, first install the [grpcio-reflection](https://pypi.org/project/grpcio-reflection/) the [grpcio-reflection] PyPI package into your project.
PyPI package into your project.
Note that with Python you need to manually register the service Note that with Python you need to manually register the service
descriptors with the reflection service implementation when creating a server descriptors with the reflection service implementation when creating a server
@ -30,15 +29,11 @@ def serve():
server.start() server.start()
``` ```
Please see Please see [greeter_server_with_reflection.py] in the examples directory for the full
[greeter_server_with_reflection.py](https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server_with_reflection.py) example, which extends the gRPC [Python `Greeter` example] on a reflection-enabled server.
in the examples directory for the full example, which extends the gRPC [Python
`Greeter` example](https://github.com/grpc/tree/master/examples/python/helloworld) on a
reflection-enabled server.
After starting the server, you can verify that the server reflection After starting the server, you can verify that the server reflection
is working properly by using the [`grpc_cli` command line is working properly by using the [`grpc_cli` command line tool]:
tool](https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md):
```sh ```sh
$ grpc_cli ls localhost:50051 $ grpc_cli ls localhost:50051
@ -51,11 +46,21 @@ tool](https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md):
``` ```
For more examples and instructions how to use the `grpc_cli` tool, For more examples and instructions how to use the `grpc_cli` tool,
please refer to the [`grpc_cli` documentation](../command_line_tool.md) please refer to the [`grpc_cli` documentation] and the
and the [C++ Server Reflection Tutorial](../server_reflection_tutorial.md). [C++ Server Reflection Tutorial].
## Additional Resources ## Additional Resources
The [Server Reflection Protocol](../server-reflection.md) provides detailed The [Server Reflection Protocol] provides detailed
information about how the server reflection works and describes the server reflection information about how the server reflection works and describes the server reflection
protocol in detail. protocol in detail.
[C++ Server Reflection Tutorial]: ../server_reflection_tutorial.md
[grpcio-reflection]: https://pypi.org/project/grpcio-reflection/
[greeter_server_with_reflection.py]: https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server_with_reflection.py
[Python `Greeter` example]: https://github.com/grpc/grpc/tree/master/examples/python/helloworld
[`grpc_cli` command line tool]: https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md
[`grpc_cli` documentation]: ../command_line_tool.md
[C++ Server Reflection Tutorial]: ../server_reflection_tutorial.md
[Server Reflection Protocol]: ../server-reflection.md

Loading…
Cancel
Save