grpcurl icon indicating copy to clipboard operation
grpcurl copied to clipboard

Support for PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION

Open Bec-k opened this issue 2 years ago • 1 comments
trafficstars

In our code, we use os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" Because of this, float arrays sent with grpcurl are converted into double, i could be wrong on this. In any case, adding this extra casting code is solving that, but still, it would be better if we could provide additional option to how grpcurl would handle casting implementation.

    arr = np.array(request.user_ids)
    user_ids = arr.astype(np.float)

Bec-k avatar Dec 14 '22 12:12 Bec-k

As we use grpcurl for debugging purpose, we have to add that extra casting lines into our grpc handlers, because in production we don't need extra casting.

Bec-k avatar Dec 14 '22 12:12 Bec-k