0

I have two .proto schema file with the following directives:

// vendor_interface.proto
syntax = "proto3";
package vendor.name.int.v1;

import "google/protobuf/timestamp.proto";
...

and

    // vendor_interface_api.proto
    syntax = "proto3";
    package vendor.name.int.v1;
    import "vendor/name/int/v1/vendor_interface.proto";
    ...
    message my_message {
       vendor.name.int.v1.token token = 1;
       ...
    }
    ...

I noticed that grpc and protobuf code generated with

% python3 -m grpc_tools.protoc --proto_path=./my_proto_grpc/ \
                               --python_out=. \
                               --grpc_python_out=. \
                               ./my_proto_grpc/vendor/name/int/v1/vendor_interface.proto

is placed in vendor/name/int/v1/, is it expected behavior? Does it mean that python code using API, classes etc. from the generated files need to have updated PYTHONPATH (so that it finds the generated code)?

Mark
  • 6,052
  • 8
  • 61
  • 129

0 Answers0