def topic(self): self.conn = S3Connection() self.conn.create_bucket(s3_bucket) config=Config(STORAGE_BUCKET=s3_bucket) storage = Storage(Context(config=config, server=get_server('ACME-SEC'))) storage.put(IMAGE_URL % '3', IMAGE_BYTES) return storage.exists(IMAGE_URL % '3')
def topic(self): self.conn = S3Connection() self.conn.create_bucket(s3_bucket) config=Config(STORAGE_BUCKET=s3_bucket, STORES_CRYPTO_KEY_FOR_EACH_IMAGE=True) storage = Storage(Context(config=config, server=get_server(''))) storage.put(IMAGE_URL % '9999', IMAGE_BYTES) storage.put_crypto(IMAGE_URL % '9999')
def topic(self): self.conn = S3Connection() self.conn.create_bucket(s3_bucket) config=Config(STORAGE_BUCKET=s3_bucket) storage = Storage(Context(config=config, server=get_server('ACME-SEC'))) storage.put(IMAGE_URL % '7', IMAGE_BYTES) storage.put_detector_data(IMAGE_URL % '7', 'some-data') return storage.get_detector_data(IMAGE_URL % '7')
def topic(self): self.conn = S3Connection() bucket = self.conn.create_bucket(s3_bucket) thumborId = IMAGE_URL % '1' config=Config(STORAGE_BUCKET=s3_bucket) storage = Storage(Context(config=config, server=get_server('ACME-SEC'))) store = storage.put(thumborId, IMAGE_BYTES ) k = Key(bucket) k.key = thumborId result = k.get_contents_as_string() return (store , result)