import os

from azure.storage import *


def store(image, entity, entity_id):
    blob_service = BlobService(account_name='shnergledata',
                               account_key=os.environ['BLOB_KEY'])
    myblob = image.read()
    name = '/' + entity + '/' + entity_id
    blob_service.put_blob('images', name, myblob, x_ms_blob_type='BlockBlob')
    return True


def retrieve(entity, entity_id):
    blob_service = BlobService(account_name='shnergledata',
                               account_key=os.environ['BLOB_KEY'])
    name = '/' + entity + '/' + entity_id
    blob = blob_service.get_blob('images', name)
    return blob

import os

from azure.storage import BlobService


def store(image, entity, entity_id):
    blob_service = BlobService(account_name='shnergledata',
                               account_key=os.environ['BLOB_KEY'])
    myblob = image.read()
    name = '/' + entity + '/' + entity_id
    blob_service.put_blob('images', name, myblob, x_ms_blob_type='BlockBlob')
    return True


def retrieve(entity, entity_id):
    blob_service = BlobService(account_name='shnergledata',
                               account_key=os.environ['BLOB_KEY'])
    name = '/' + entity + '/' + entity_id
    blob = blob_service.get_blob('images', name)
    return blob

Revert "The same thing, but their way haha"
Revert "The same thing, but their way haha"

This reverts commit ab12f6cc4593e81bc426a54e8aebc1671ac34e2a.
