MCPcopy
hub / github.com/pallets/flask / load

Method load

src/flask/json/provider.py:67–73  ·  view source on GitHub ↗

Deserialize data as JSON read from a file. :param fp: A file opened for reading text or UTF-8 bytes. :param kwargs: May be passed to the underlying JSON library.

(self, fp: t.IO[t.AnyStr], **kwargs: t.Any)

Source from the content-addressed store, hash-verified

65 raise NotImplementedError
66
67 def load(self, fp: t.IO[t.AnyStr], **kwargs: t.Any) -> t.Any:
68 """Deserialize data as JSON read from a file.
69
70 :param fp: A file opened for reading text or UTF-8 bytes.
71 :param kwargs: May be passed to the underlying JSON library.
72 """
73 return self.loads(fp.read(), **kwargs)
74
75 def _prepare_response_obj(
76 self, args: tuple[t.Any, ...], kwargs: dict[str, t.Any]

Callers 3

_load_plugin_commandsMethod · 0.80
loadFunction · 0.80
test_json_dump_to_fileFunction · 0.80

Calls 1

loadsMethod · 0.95

Tested by 1

test_json_dump_to_fileFunction · 0.64