Objects proxy handler

Objects proxy handler adds account id as query parameter or json to request and make request to luna-image-store.

Handler for a certain objects.

class luna_api.app.handlers.objects_proxy_handler.ObjectHandler(request)[source]

Handler for work with an object. See spec_objects.

Resource: “/{api_version}/objects/{objectId}”

prepareUrl()[source]

Prepare url to the LIS service.

Returns:

same url with correct api version

Return type:

str

class luna_api.app.handlers.objects_proxy_handler.ObjectsHandler(request)[source]

Handler for create new objects. See spec_objects.

Resource: “/{api_version}/objects”

async options(*args, **kwargs)[source]

Options method

Return type:

HTTPResponse

async post(*args, **kwargs)[source]

Streaming ‘post’ method :returns: proxy response

Return type:

HTTPResponse

async postProcessingPost(response)[source]

Default post processing response from the service :param response: response

Returns:

response in api format

Return type:

HTTPResponse

async prepareRequestPost()[source]

Prepare proxy request for method post :returns: proxy request

Return type:

ProxyRequest

prepareUrl()[source]

Prepare url to the LIS service.

Returns:

A str, url

Return type:

str

async requestBodyStream()[source]

Read request body chunks by stream.

Return type:

AsyncIterable[bytes]