gRPC 的安裝:
$ pip install grpcio
安裝 ProtoBuf 相關(guān)的 python 依賴庫:
$ pip install protobuf
安裝 python grpc 的 protobuf 編譯工具:
$ pip install grpcio-tools
測試
//源碼路徑 https://github.com/grpc/grpcgit clone https://github.com/grpc/grpccd grpc/examples/python/helloworldpython greeter_server.py //一個常駐服務(wù)//啟動客戶端訪問serverpython greeter_client.py//打印Greeter client received: Hello, you! 即為可以使用
新聞熱點
疑難解答