Plugin does not generate gRPC stubs to *_pb2_grpc.py
See original GitHub issueStarting from some version of the protoc compiler, gRPC service stubs are no longer generated into *_pb2.py
files. Now they are generated into separate *_pb2_grpc.py
files. So to properly support grpcio library *_pb2_grpc.pyi
files should be generated for service stubs.
And it would be great to generate gRPC stubs optionally, this would be possible if two separate CLI options (plugins) for protoc were created:
--mypy_out
for messages--mypy_gprc_out
for gRPC stubs
I’m asking for this feature because I’m the author of the grpclib library, which is an alternative gRPC implementation for asyncio, and users of this library don’t need gRPC stubs for grpcio.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Plugin does not generate gRPC stubs to *_pb2_grpc.py #46
Starting from some version of the protoc compiler, gRPC service stubs are no longer generated into *_pb2.py files. Now they are generated ......
Read more >Generated-code reference | Python
Generated -code reference. gRPC Python relies on the protocol buffers compiler ( protoc ) to generate code. It uses a plugin to supplement...
Read more >service without gRPC
You need to invoke the grpc plugin. The default protoc tool does not generate gRPC stubs on it's own. Here's what it looks...
Read more >Getting started with GRPC python Docker Creating ... - YouTube
Your browser can't play this video. Learn more. Switch camera ... Getting started with GRPC python Docker Creating Fast Backend in Http 2....
Read more >protocol buffers - protoc not generating service stub files
The command line you are showing does not enable the grpc plugin. You need to specify an _out argument for the grpc plugin,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This project has been a life-saver so far even without grpc support, but I’d love to see this issue resolved!
@Evgenus worked on a grpc-stubs implementation - which is now landed on master and will get into the next release