Objects handler

Handler for work with a objects

class luna_image_store.app.handlers.objects_handler.ObjectsHandler(request)[source]

Handler for work with signel object or several objects.

Resource: “{api_version}/buckets/{bucketName}/objects”

async delete(bucketName)[source]

Delete objects from bucket. See spec_delete_objects.

Parameters

bucketName (str) – bucket name

Return type

HTTPResponse

Returns

response with status code 204, Error.FieldNotInJSON with status code 400, if field “objects” not found in json, Error.ObjectInBucketCountExceededLimit with status code 400, if object count exceeded limit 1000.

async post(bucketName)[source]

Post object to bucket. See spec_post_objects.

Parameters

bucketName (str) – bucket name

Return type

HTTPResponse

Returns

response with object id and location, if status code 201, Error.NotContainsData with status code 400, if request does not contain data, Error.SpecifiedTypeNotMatchDataType with status code 400, if content type does not match data type, Error.UnsupportedMediaType with status code 415, if unsupported media type.