mirror of https://github.com/grpc/grpc.io.git
Add protobuf type stub generation to guides (#1068)
This commit is contained in:
parent
30ca5681b3
commit
b2ece33dae
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue