From 58556e0eb65cf4dc59c7f02336b98ec65e7d4283 Mon Sep 17 00:00:00 2001 From: Jonas Kalderstam Date: Sat, 19 Sep 2020 17:03:49 +0200 Subject: [PATCH] Update README with example of calling protoc from python (#149) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d86eda..2f3b95c 100644 --- a/README.md +++ b/README.md @@ -70,13 +70,20 @@ message Greeting { } ``` -You can run the following: +You can run the following to invoke protoc directly: ```sh mkdir lib 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: ```python