MCPcopy Create free account
hub / github.com/Roy3838/Observer / _get_bytes_sync

Function _get_bytes_sync

api/r2_store.py:110–117  ·  view source on GitHub ↗
(key: str)

Source from the content-addressed store, hash-verified

108
109
110def _get_bytes_sync(key: str) -> Optional[Tuple[bytes, str]]:
111 try:
112 resp = _get_client().get_object(Bucket=R2_BUCKET, Key=key)
113 except ClientError as e:
114 if e.response["Error"]["Code"] in ("NoSuchKey", "404"):
115 return None
116 raise
117 return resp["Body"].read(), resp.get("ContentType", "application/octet-stream")
118
119
120def _delete_sync(key: str) -> None:

Callers

nothing calls this directly

Calls 2

_get_clientFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected