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

Function _dump_selected

scripts/dump_lmdb.py:26–33  ·  view source on GitHub ↗

Return records for the provided keys.

(txn: lmdb.Transaction, keys: Iterable[str])

Source from the content-addressed store, hash-verified

24
25
26def _dump_selected(txn: lmdb.Transaction, keys: Iterable[str]) -> list[dict[str, Any]]:
27 """Return records for the provided keys."""
28 result: list[dict[str, Any]] = []
29 for key in keys:
30 raw = txn.get(key.encode("utf-8"))
31 if raw is not None:
32 result.append({"key": key, "value": _decode_value(raw)})
33 return result
34
35
36def dump_lmdb(path: Path, keys: Iterable[str] | None = None) -> None:

Callers 1

dump_lmdbFunction · 0.85

Calls 2

_decode_valueFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected