python配置grpc环境

gRPC 的安装:
$ pip install grpcio

安装 ProtoBuf 相关的 python 依赖库:
$ pip install protobuf

安装 python grpc 的 protobuf 编译工具:
$ pip install grpcio-tools

测试

//源码路径 https://github.com/grpc/grpc
git clone https://github.com/grpc/grpc
cd grpc/examples/python/helloworld
python greeter_server.py //一个常驻服务

//启动客户端访问server
python greeter_client.py
//打印Greeter client received: Hello, you! 即为可以使用

猜你喜欢

转载自blog.51cto.com/11140372/2336794
今日推荐