python: difference between using protoc --plugin= and python -m grpc.tools.protoc ?

528 views
Skip to first unread message

ascani...@gmail.com

unread,
Aug 15, 2016, 2:43:33 AM8/15/16
to grpc.io
What is the difference between invoking protoc

protoc -I. --python_out=tmp --grpc_out=tmp --plugin=protoc-gen-grpc=`which grpc_python_plugin`       test.proto
(some online docs)

and using grpcio-tools

python -m grpc.tools.protoc -I. --python_out=tmp  --grpc_python_out=tmp   test.proto
(official gRPC Basics: python)

Are they the same thing?

Regards
Anthony


Nathaniel Manista

unread,
Aug 16, 2016, 1:47:28 AM8/16/16
to ascani...@gmail.com, grpc.io
They're not the same thing, but they should have the same effect (produce identical generated _pb2.py files). Use whichever is more convenient!
-Nathaniel
Reply all
Reply to author
Forward
0 new messages