MCPcopy Create free account
hub / github.com/dot-agent/nextpy / _read_data

Method _read_data

nextpy/data/jsondb.py:157–164  ·  view source on GitHub ↗

Reads data from the JSON file. Returns: Dict[str, Any]: The data stored in the JSON file.

(self)

Source from the content-addressed store, hash-verified

155 return int(str(uuid.uuid4().int)[:18])
156
157 def _read_data(self) -> Dict[str, Any]:
158 """Reads data from the JSON file.
159
160 Returns:
161 Dict[str, Any]: The data stored in the JSON file.
162 """
163 with self.lock, open(self.filename, "r") as db_file:
164 return json.load(db_file)
165
166 def _write_data(self, data: Dict[str, Any]) -> None:
167 """Writes the given data into the JSON file.

Callers 5

addMethod · 0.95
queryMethod · 0.95
getMethod · 0.95
deleteMethod · 0.95
updateMethod · 0.95

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected