mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Read document bytes from an arbitrary source bucket 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0a09b56425
commit
79fa46d97c
1 changed files with 3 additions and 1 deletions
|
|
@ -16,4 +16,6 @@ class S3DocumentBytesReader:
|
|||
self._client = boto_s3_client
|
||||
|
||||
def read(self, bucket: str, key: str) -> bytes:
|
||||
raise NotImplementedError
|
||||
response: dict[str, Any] = self._client.get_object(Bucket=bucket, Key=key)
|
||||
body: bytes = response["Body"].read()
|
||||
return body
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue