MCPcopy Index your code
hub / github.com/hugapi/hug / input_format

Method input_format

hug/api.py:135–139  ·  view source on GitHub ↗

Returns the set input_format handler for the given content_type

(self, content_type)

Source from the content-addressed store, hash-verified

133 yield handler
134
135 def input_format(self, content_type):
136 """Returns the set input_format handler for the given content_type"""
137 return getattr(self, "_input_format", {}).get(
138 content_type, hug.defaults.input_format.get(content_type, None)
139 )
140
141 def set_input_format(self, content_type, handler):
142 """Sets an input format handler for this Hug API, given the specified content_type"""

Callers 2

test_input_formatFunction · 0.80
gather_parametersMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 1

test_input_formatFunction · 0.64