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)
| 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 | """ |
no outgoing calls
no test coverage detected