Skip to content

Commit 58556e0

Browse files
authored
Update README with example of calling protoc from python (#149)
1 parent a3f5f21 commit 58556e0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,20 @@ message Greeting {
7070
}
7171
```
7272

73-
You can run the following:
73+
You can run the following to invoke protoc directly:
7474

7575
```sh
7676
mkdir lib
7777
protoc -I . --python_betterproto_out=lib example.proto
7878
```
7979

80+
or run the following to invoke protoc via grpcio-tools:
81+
82+
```sh
83+
pip install grpcio-tools
84+
python -m grpc_tools.protoc -I . --python_betterproto_out=lib example.proto
85+
```
86+
8087
This will generate `lib/hello/__init__.py` which looks like:
8188

8289
```python

0 commit comments

Comments
 (0)