Handlers proxy handler

Handlers proxy handler adds account id as query parameter or json to request and make request to luna-handlers.

Handler for a certain handler.

class luna_api.app.handlers.handlers_proxy_handler.CountHandlerProxyHandler(request)[source]

Proxy handler replace handler. See spec_handlers_count.

Resource: “/{api_version}/handlers/count”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

class luna_api.app.handlers.handlers_proxy_handler.DetectorProxyHandler(request)[source]

Proxy handler for detecting faces on images. See spec_detector.

Resource: “/{api_version}/detector”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

async postProcessingPost(response)[source]

Post processing response from the service.

class luna_api.app.handlers.handlers_proxy_handler.EventHandlerProxyHandler(request)[source]

Proxy handler for SDK estimations. See spec_emit_events.

Resource: “/{api_version}/handlers/{handler_id}/events”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

async postProcessingPost(response)[source]

Post processing response from the service.

class luna_api.app.handlers.handlers_proxy_handler.EventRawHandlerProxyHandler(request)[source]

Proxy handler for save raw event. See spec_save_event.

Resource: “/{api_version}/handlers/{handler_id}/events/raw”

async checkExistingObject(container, queryValue)[source]

Check existing object by account id.

Parameters:
  • container – container class with request client and possible error

  • queryValue – query value

Raises:

VLException(Error.ObjectNotFound, 404) if object not found

Return type:

None

async checkObjectsBelongToAccount()[source]

Check that event objects are associated with an account.

Returns:

Proxy request with raw event

Return type:

ProxyRequest

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

async postProcessingPost(response)[source]

Post processing response from the service.

async prepareRequestPost()[source]

Prepare proxy request for method post.

Returns:

Proxy request with raw event

Return type:

ProxyRequest

class luna_api.app.handlers.handlers_proxy_handler.ExtractorProxyHandler(request)[source]

Proxy handler for extracting attributes such as gender, age, ethnicity, descriptor from samples. See spec_extractor.

Resource: “/{api_version}/extractor”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

async postProcessingPost(response)[source]

Post processing response from the service.

class luna_api.app.handlers.handlers_proxy_handler.HandlerProxyHandler(request)[source]

Proxy handler replace handler. See spec_handlers_handler.

Resource: “/{api_version}/handlers/{handlerId}”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

async prepareRequestPut()[source]

Prepare proxy request for method put :returns: proxy request

Return type:

ProxyRequest

class luna_api.app.handlers.handlers_proxy_handler.HandlerVerifyRawProxy(request)[source]

Proxy handler for SDK estimations. See spec_verifiers.

Resource: “/{api_version}/verifiers/{verifier_id}/raw”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

class luna_api.app.handlers.handlers_proxy_handler.HandlersProxyHandler(request)[source]

Proxy handler for create new handlers. See spec_handlers.

Resource: “/{api_version}/handlers”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

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

class luna_api.app.handlers.handlers_proxy_handler.HandlersValidatorProxyHandler(request)[source]

Proxy handler for validate handler policies. See spec_validate_handler_policies.

Resource: “/{api_version}/handlers/validator”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

async prepareRequestPost()[source]

Prepare proxy request for method post :returns: proxy request

Return type:

ProxyRequest

class luna_api.app.handlers.handlers_proxy_handler.ISOHandlerProxyHandler(request)[source]

Proxy handler for ISO estimations.See spec_iso.

Resource: “/{api_version}/iso”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

class luna_api.app.handlers.handlers_proxy_handler.RawEventObjectContainer(globPathToObject, queryName, client, objectNotFoundError)[source]

Event object container for checking its existence in the service.

class luna_api.app.handlers.handlers_proxy_handler.SDKHandlerProxyHandler(request)[source]

Proxy handler for SDK estimations.See spec_sdk.

Resource: “/{api_version}/sdk”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

class luna_api.app.handlers.handlers_proxy_handler.VerifierCountHandlerProxy(request)[source]

Proxy handler for SDK estimations. See spec_verifiers.

Resource: “/{api_version}/verifiers/count”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

class luna_api.app.handlers.handlers_proxy_handler.VerifierHandlerProxy(request)[source]

Proxy handler for SDK estimations. See spec_verifiers.

Resource: “/{api_version}/verifiers/{verifier_id}”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

async prepareRequestPut()[source]

Prepare proxy request for method put :returns: proxy request

Return type:

ProxyRequest

class luna_api.app.handlers.handlers_proxy_handler.VerifierVerificationsHandlerProxy(request)[source]

Proxy handler for SDK estimations. See spec_verifiers.

Resource: “/{api_version}/verifiers/{verifier_id}/verifications”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

async postProcessingPost(response)[source]

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

Returns:

response in api format

class luna_api.app.handlers.handlers_proxy_handler.VerifiersHandlerProxy(request)[source]

Proxy handler for verifiers. See spec_verifiers.

Resource: “/{api_version}/verifiers”

checkTokenPermissions()[source]

Description see checkTokenPermissions().

Return type:

None

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