-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem
The current frontier-python SDK uses REST endpoints, but Frontier now exposes gRPC/Connect endpoints on port 8082. Python clients need a gRPC client to connect to these endpoints.
Solution
Generate a Python gRPC client from Frontier's protobuf definitions using Buf. Since Connect is backward compatible with gRPC, a standard gRPC Python client should work seamlessly with Frontier's Connect endpoints.
Implementation
Use Buf to generate the gRPC Python client:
- Add
buf.gen.yamlconfiguration:
version: v1
plugins:
- plugin: buf.build/protocolbuffers/python
out: gen
- plugin: buf.build/grpc/python
out: gen- Generate client:
buf generateThis will generate standard gRPC Python stubs that work with both gRPC and Connect protocols.
Metadata
Metadata
Assignees
Labels
No labels