#🔒 Grpc Python help

24 messages · Page 1 of 1 (latest)

covert juniper
#

Would appreciate some help regarding how to add fields to metadata in interceptor and propagate the new metadata forward , have tried a couple of things but running into issues

dusty hawkBOT
#

@covert juniper

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

fossil fulcrum
#

What have you tried so far?

#

@covert juniper

covert juniper
#

apparently you cant create a new handlerCalldetails

#

HandlerCallDetails() takes no arguments

#

this is the error

#

specifically

fossil fulcrum
#

HandlerCallDetails is defined as an ABC (Abstract Base Model), so that makes sense.

covert juniper
#

lemme check

covert juniper
#

i am trying to manipulate on the server side

covert juniper
#

yup checking there

fossil fulcrum
#

It creates a grpc.server with a tuple of interceptors, and includes the header_validator.

#

Basically it's a class you create that inherits grpc.ServerInterceptor, has a def intercept_service method defined, and then does things to its handler_call_details argument.

#

As you find, you don't create the details: they are passed to this method as an arg.

covert juniper
#

lemme check

dusty hawkBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.