MCPcopy Create free account
hub / github.com/diffgram/diffgram / download_bytes

Method download_bytes

shared/data_tools_core_s3.py:214–223  ·  view source on GitHub ↗

Downloads the given blob as bytes content. :param blob_path: path of the cloud provider bucket to download the bytes from :return: bytes of the blob that was downloaded

(self, blob_path: str)

Source from the content-addressed store, hash-verified

212 ContentType = content_type)
213
214 def download_bytes(self, blob_path: str):
215 """
216 Downloads the given blob as bytes content.
217 :param blob_path: path of the cloud provider bucket to download the bytes from
218 :return: bytes of the blob that was downloaded
219 """
220 bytes_buffer = BytesIO()
221 self.s3_client.download_fileobj(Bucket = self.s3_bucket_name, Key = blob_path, Fileobj = bytes_buffer)
222 byte_value = bytes_buffer.getvalue()
223 return byte_value
224
225 def get_image(self, blob_path: str):
226 """

Callers 3

overlayMethod · 0.45
__getitem__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected