[grpc-io] Packaging python grpc stubs

2022-01-06 Thread Brad Post
Hello, I'm new to gRPC and Python and apologize for what could be a simple solution that I don't realize. I am building a microservice, call it SERVICER, that is the servicer of gRPC calls. Other microservices are going to use the gRPC stub. I wanted to have just one repository for SERVICER t

[grpc-io] TypeError: Couldn't build proto file into descriptor pool!

2022-12-23 Thread Brad Post
Hello, I am working in Python. I have a proto file in PACKAGE_A that I am trying to import into PACKAGE_B. Package_A is installed via pip install, so it live in the *site_packages* of the venv. Package_B's proto file includes the *import "package_a/package_a.proto"* at the top of the file.

[grpc-io] gRPC message validation question

2023-05-01 Thread Brad Post
Is there a built in validator to ensure that the message passed to a method is the correct one? For example: *message GetAddressInfoRequest {* *string street = 1;* *string zip = 2;* *};* *rpc get_address_info(GetAddressInfoRequest) returns (GetAddressResult);* I would like the functio

Re: [grpc-io] gRPC message validation question

2023-05-04 Thread Brad Post
se message in the proto, so "don't do that." Instead, create > a new function with the new signature that you want. > > On Mon, May 1, 2023 at 7:30 AM Brad Post wrote: > >> Is there a built in validator to ensure that the message passed to a >> m

Re: [grpc-io] gRPC message validation question

2023-05-05 Thread Brad Post
Ok, thanks for the clarification. On Thu, 4 May 2023 at 08:29, Eric Anderson wrote: > On Thu, May 4, 2023 at 7:29 AM Brad Post wrote: > >> Okay thanks, but then what is the recommended way of "defending" bad >> requests. >> > > Ignore this case and

[grpc-io] gRPC Gateway and mapping question

2024-10-17 Thread Brad Post
I just want to make sure I understand the spec for gRPC and HTTP gateway correctly as I was trying to do have the resource ID replaced in a sub message. So this call: - HTTP: `PATCH /v1/keys/1234` - gRPC: `patch_key(Data:UpdateKeyRequestData(UpdateKeyId: "123"))` Is this possible? As seems tha

[grpc-io] HTTP and gRPC mapping question for grpc_gateway

2024-10-17 Thread Brad Post
Hello, Trying to get some clarification on the HTTP to gRPC mapping as I would like to do the following mapping when sending in resource ids: - HTTP: PATCH /v1/keys/1234 - gRPC: patch_key(Data: UpdateKeyRequestData(UpdateKeyId: `1234`)) But seems that due to the HTTP body rules and how gRPC is