Update README with example of calling protoc from python (#149)
This commit is contained in:
parent
a3f5f21738
commit
58556e0eb6
@ -70,13 +70,20 @@ message Greeting {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
You can run the following:
|
You can run the following to invoke protoc directly:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir lib
|
mkdir lib
|
||||||
protoc -I . --python_betterproto_out=lib example.proto
|
protoc -I . --python_betterproto_out=lib example.proto
|
||||||
```
|
```
|
||||||
|
|
||||||
|
or run the following to invoke protoc via grpcio-tools:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pip install grpcio-tools
|
||||||
|
python -m grpc_tools.protoc -I . --python_betterproto_out=lib example.proto
|
||||||
|
```
|
||||||
|
|
||||||
This will generate `lib/hello/__init__.py` which looks like:
|
This will generate `lib/hello/__init__.py` which looks like:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
Loading…
x
Reference in New Issue
Block a user