Protobuf Stubs
July 5, 2026 ยท View on GitHub
After changing src/sangam/proto/sangam.proto, regenerate Python stubs and typings with the repo-owned script.
Regenerate
uv run python scripts/generate_protobuf.py
The script:
- runs
grpc_tools.protocforsangam.proto - emits
sangam_pb2.py,sangam_pb2.pyi,sangam_pb2_grpc.py, andsangam_pb2_grpc.pyi - uses
mypy-protobuffor the gRPC.pyifile - normalizes generated imports so the checked-in files work from the
sangam.protopackage without manual edits
If the script reports a missing plugin, run uv sync --dev first.