【grpc proto】python使用proto文件生成简易的服务端和客户端

1、安装python-grpc(注意,是grpcio包,不是grpc包!)

 pip install grpcio

2、编写.proto文件

grpc教程:http://doc.oschina.net/grpc?t=60138

grpc proto文件编写注意事项:https://blog.csdn.net/qq_43178297/article/details/88053268

3、使用proto文件生成python客户端和服务端文件

python -m grpc_tools.protoc -I=./ --python_out=. --grpc_python_out=. scheduler_service.proto
原文地址:https://www.cnblogs.com/zealousness/p/10931604.html