MCPcopy Create free account
hub / github.com/0xMarcio/cve / _path_for

Method _path_for

scripts/github_client.py:36–38  ·  view source on GitHub ↗
(self, key: str)

Source from the content-addressed store, hash-verified

34 self.base.mkdir(parents=True, exist_ok=True)
35
36 def _path_for(self, key: str) -> Path:
37 digest = hash_key(key)
38 return self.base / digest[:2] / f"{digest}.json"
39
40 def load(self, key: str, *, ttl: int) -> Optional[Dict]:
41 path = self._path_for(key)

Callers 2

loadMethod · 0.95
saveMethod · 0.95

Calls 1

hash_keyFunction · 0.90

Tested by

no test coverage detected