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

Function _put_bytes_sync

api/r2_store.py:97–107  ·  view source on GitHub ↗
(key: str, body: bytes, content_type: str, content_encoding: Optional[str])

Source from the content-addressed store, hash-verified

95
96
97def _put_bytes_sync(key: str, body: bytes, content_type: str, content_encoding: Optional[str]) -> str:
98 params = {
99 "Bucket": R2_BUCKET,
100 "Key": key,
101 "Body": body,
102 "ContentType": content_type,
103 }
104 if content_encoding:
105 params["ContentEncoding"] = content_encoding
106 resp = _get_client().put_object(**params)
107 return resp.get("ETag")
108
109
110def _get_bytes_sync(key: str) -> Optional[Tuple[bytes, str]]:

Callers

nothing calls this directly

Calls 1

_get_clientFunction · 0.85

Tested by

no test coverage detected