MCPcopy Create free account
hub / github.com/psf/cachecontrol / get_body

Method get_body

cachecontrol/caches/file_cache.py:123–128  ·  view source on GitHub ↗
(self, key: str)

Source from the content-addressed store, hash-verified

121 """
122
123 def get_body(self, key: str) -> IO[bytes] | None:
124 name = self._fn(key) + ".body"
125 try:
126 return open(name, "rb")
127 except FileNotFoundError:
128 return None
129
130 def set_body(self, key: str, body: bytes) -> None:
131 name = self._fn(key) + ".body"

Callers

nothing calls this directly

Calls 1

_fnMethod · 0.80

Tested by

no test coverage detected