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

Generate python class interface files from protobuf #475

Open
felicijus opened this issue Sep 9, 2024 · 0 comments · May be fixed by #476
Open

Generate python class interface files from protobuf #475

felicijus opened this issue Sep 9, 2024 · 0 comments · May be fixed by #476

Comments

@felicijus
Copy link
Contributor

felicijus commented Sep 9, 2024

Is your feature request related to a problem? Please describe.

The pyzee internals are using unknown imports and some non proto Stub generated type classes.
The package zeebe-grpc does not provide python class files from protobuf. And uses older versions of grpcio and protobuf.

Describe the solution you'd like
Generate the protobuf stubs and interface (.pyi) for Python ourselfs and remove the dependency from zeebe-grpc.
This also enhances type hints because of the usage of the protobuf generated interface for pyzeebe.

There is also the option to create mypy types from protobuf.

python -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. --pyi_out=. ./pyzeebe/proto/gateway.proto

For this we need to add the following requirements:

  1. grpcio = ">=1.66.0"
  2. grpcio-tools = ">=1.66.0"
  3. protobuf = ">=5.27.2,<5.28.0"

Additional context

https://grpc.io/docs/languages/python/basics/#generating-client-and-server-code
https://mypy.readthedocs.io/en/stable/stubs.html

@felicijus felicijus changed the title Generate python class files from protobuf Generate python class interface files from protobuf Sep 9, 2024
@felicijus felicijus linked a pull request Sep 9, 2024 that will close this issue
2 tasks
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

Successfully merging a pull request may close this issue.

1 participant