def get_cached_item(self, path):
        """
        Get cached resource item
        :param path: str
        :return: PIL.Image
        """
        item_path = '%s/%s' % (
                self.cache_folder,
                path.strip('/')
            )

        try:
            f = tempfile.NamedTemporaryFile()
            self.blob_service.get_blob_to_path(self.container_name, item_path, f.name)
            f.seek(0)
            image = Image.open(f.name)
            f.close()

            return image
        except AzureMissingResourceHttpError:
            return False
def get_cached_item ( self , path ) : item_path = '%s/%s' % ( self . cache_folder , path . strip ( '/' ) ) try : f = tempfile . NamedTemporaryFile ( ) self . blob_service . get_blob_to_path ( self . container_name , item_path , f . name ) f . seek ( 0 ) image = Image . open ( f . name ) f . close ( ) return image except AzureMissingResourceHttpError : return False
Get cached resource item
        :param path: str
        :return: PIL.Image