MCPcopy Create free account
hub / github.com/Nativu5/Gemini-FastAPI / _decode_value

Function _decode_value

scripts/dump_lmdb.py:10–15  ·  view source on GitHub ↗

Decode a value from LMDB to Python data.

(value: bytes)

Source from the content-addressed store, hash-verified

8
9
10def _decode_value(value: bytes) -> Any:
11 """Decode a value from LMDB to Python data."""
12 try:
13 return orjson.loads(value)
14 except orjson.JSONDecodeError:
15 return value.decode("utf-8", errors="replace")
16
17
18def _dump_all(txn: lmdb.Transaction) -> list[dict[str, Any]]:

Callers 2

_dump_allFunction · 0.85
_dump_selectedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected