Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Add typing for python code compiler

75 views
Skip to first unread message

Robert Aistleitner

unread,
Dec 2, 2024, 2:15:14 AM12/2/24
to grpc.io
Hey there,

I previously used another grpc library called betterproto which generates pretty nice python code (stubs and servicer classes), but as I noticed later has pretty poor performance. For this reason I switched to this grpc library which has awesome performance, but the python code generator didn't generate typed code. In my opinion it is a must to ensure that all protos (servicers) are implemented properly on server side and the used clients (stubs) have proper typing, too.

For those reasons I tackled this issue and implemented proper type generation for the python compiler for myself and generated a PR on github for it: https://github.com/grpc/grpc/pull/37877.

I started using it on a daily basis and already found and eliminated various bugs in the generated types, but also improved it to use the great `grpc.aio` typed python code of the python library. Once typed code for `grpc` sync version is available this will give the generated code another boost in developer experience.

Please tell me what you think and if there's a chance to get this merged anytime soon.


Best,
Robert

Robert Aistleitner

unread,
Jan 15, 2025, 1:43:33 AMJan 15
to grpc.io
Before this is totally forgotten without any comment, I'd really appreciate some feedback on this just to know if this is something others also want to see in the standard grpc.io library.

Best,
Robert

Reply all
Reply to author
Forward
0 new messages