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

Function _underscore_dict

hug/input_format.py:46–54  ·  view source on GitHub ↗
(dictionary)

Source from the content-addressed store, hash-verified

44
45
46def _underscore_dict(dictionary):
47 new_dictionary = {}
48 for key, value in dictionary.items():
49 if isinstance(value, dict):
50 value = _underscore_dict(value)
51 if isinstance(key, str):
52 key = underscore(key)
53 new_dictionary[key] = value
54 return new_dictionary
55
56
57def json_underscore(body, charset="utf-8", **kwargs):

Callers 1

json_underscoreFunction · 0.85

Calls 1

underscoreFunction · 0.90

Tested by

no test coverage detected