MCPcopy Index your code
hub / github.com/plotly/dash / byteify

Function byteify

dash/development/component_generator.py:293–302  ·  view source on GitHub ↗
(input_object)

Source from the content-addressed store, hash-verified

291
292# pylint: disable=undefined-variable
293def byteify(input_object):
294 if isinstance(input_object, dict):
295 return OrderedDict(
296 [(byteify(key), byteify(value)) for key, value in input_object.items()]
297 )
298 if isinstance(input_object, list):
299 return [byteify(element) for element in input_object]
300 if isinstance(input_object, str): # noqa:F821
301 return input_object.encode(encoding="utf-8")
302 return input_object
303
304
305if __name__ == "__main__":

Callers 1

safe_json_loadsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…