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

Method transform

hug/routing.py:79–83  ·  view source on GitHub ↗

Sets the function that should be used to transform the returned Python structure into something serializable by specified output format

(self, function, **overrides)

Source from the content-addressed store, hash-verified

77 return self.where(output=formatter, **overrides)
78
79 def transform(self, function, **overrides):
80 """Sets the function that should be used to transform the returned Python structure into something
81 serializable by specified output format
82 """
83 return self.where(transform=function, **overrides)
84
85 def validate(self, validation_function, **overrides):
86 """Sets the secondary validation fucntion to use for this handler"""

Callers 3

test_transformMethod · 0.80
__call__Method · 0.80
outputMethod · 0.80

Calls 1

whereMethod · 0.95

Tested by 1

test_transformMethod · 0.64