azure_storage_8.py 416 B

12345678910
  1. def _open(self, container, name, mode="rb"):
  2. """
  3. :param str name: Filename
  4. :param str mode:
  5. :rtype: ContentFile
  6. """
  7. print(f'Retrieving blob: container={self.azure_container}, blob={name}')
  8. blob_client = self.connection.get_blob_client(container=container, blob=name)
  9. contents = blob_client.download_blob().readall()
  10. return ContentFile(contents)