I need to send python Decimal with gRPC.
To do so i wrote this simplified proto file
syntax = "proto3";
package grpc.dec;
import "google/type/decimal.proto";
message Data {
google.type.Decimal total = 1;
}
What i have installed into my venv
(venv) ➜ pip list
Package Version
------------------------ -------
googleapis-common-protos 1.63.0
grpcio 1.63.0
grpcio-tools 1.63.0
pip 23.0.1
protobuf 4.25.3
setuptools 58.1.0
So i have site-packages/google/type/decimal.proto
with Decimal message
And grpcio-tools
to run
python -m grpc_tools.protoc -I./proto --python_out=./proto/ --grpc_python_out=./proto/ --mypy_out=./proto/ ./proto/*.proto
But what i got when run this command
google/type/decimal.proto: File not found.
dec.proto:5:1: Import "google/type/decimal.proto" was not found or had errors.
dec.proto:210:3: "google.type.Decimal" is not defined.
I tried different variants and chatGPT advices, but nothing works. Please explain me how it should work