社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
Github: https://github.com/heydatatalks/gRPC_example/tree/master
#1.install gRPC
python -m pip install grpcio
#2.install gRPC tools, including protoc built-in.
python -m pip install grpcio-tools
#3.build proto
python -m grpc_tools.protoc -I./ --python_out=. --grpc_python_out=. ./hello.proto
#4.run server
python greeter_server.py
#5.run client, please open another terminal to run this
python greeter_client.py
---
Reference
[1] https://juejin.im/post/5b19590b6fb9a01e4b062391
[2] https://grpc.io/docs/guides/
[3] https://developers.google.com/protocol-buffers/docs/proto3
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!