grpc_tools没有创建xxx_grpc.py
我正在学习 grpc,但遇到了一个问题。
- 创建如下所示的 proto 文件(test.proto)
- 运行 python3 -m grpc_tools.protoc -I ./protos --python_out=。 ./protos/test.proto
期望有两个文件: test_pb2.py
和 test_pb2_grpc.py
但只有 test_pb2.py
我不确定我错过了哪一步。
syntax = "proto3";
service PingPongService{
rpc ping(Ping) returns (Pong){}
}
message Ping{
int32 count = 1;
}
message Pong{
int32 count = 2;
}
I am learning grpc, but encounter an issue.
- create proto file as showing below (test.proto)
- run
python3 -m grpc_tools.protoc -I ./protos --python_out=. ./protos/test.proto
expect to have two files:test_pb2.py
and test_pb2_grpc.py
but only have test_pb2.py
I am not sure which step I am missing.
syntax = "proto3";
service PingPongService{
rpc ping(Ping) returns (Pong){}
}
message Ping{
int32 count = 1;
}
message Pong{
int32 count = 2;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来需要添加以下参数
it seems the following arg needs to be added