Add protobuf type stub generation to guides (#1068)

This commit is contained in:
Richard Belleville 2022-11-03 16:47:50 -07:00 committed by GitHub
parent 30ca5681b3
commit b2ece33dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ $ pip install grpcio-tools
Use the following command to generate the Python code:
```sh
$ python -m grpc_tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/route_guide.proto
$ python -m grpc_tools.protoc -I../../protos --python_out=. --pyi_out=. --grpc_python_out=. ../../protos/route_guide.proto
```
Note that as we've already provided a version of the generated code in the

View File

@ -151,7 +151,7 @@ service definition.
From the `examples/python/helloworld` directory, run:
```sh
$ python -m grpc_tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/helloworld.proto
$ python -m grpc_tools.protoc -I../../protos --python_out=. --pyi_out=. --grpc_python_out=. ../../protos/helloworld.proto
```
This regenerates `helloworld_pb2.py` which contains our generated request and