Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing betterproto + grpclib for more pythonic code and asyncio #42

Open
quite opened this issue Jun 4, 2021 · 0 comments
Open

testing betterproto + grpclib for more pythonic code and asyncio #42

quite opened this issue Jun 4, 2021 · 0 comments

Comments

@quite
Copy link
Contributor

quite commented Jun 4, 2021

I've tried out betterproto as an alternative to the protoc python (branch betterproto-test). Together with grpclib's asyncio based calling, it looks quite nice and much more pythonic, snake_case, etc. Some differences are that the calls typically take only keyword args, and all our proto-files are baked into one python package "base" (we do have package base; in every file!).

I've ported the simple ecu.py along with only the helpers that it used. See the diff: master...betterproto-test

Try checking out the branch and running this script, which uses virtualenv to install dependencies etc:

cd examples/grpc/python/simple_ecu
./run-betterproto-ecu

Moving over completely to betterproto would take quite some work. Also, we use grpc streaming to client, so a pre-release 2.0 beta of betterproto was required.

All this actually did work in python 3.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant