Samples handler¶
Save samples to storage
- class luna_api.app.handlers.samples_handler.BodySamplesProxyHandler(request)[source]¶
Body sample proxy handler. See spec body samples.
Resource: “/{api_version}/samples/bodies”
- class luna_api.app.handlers.samples_handler.FaceSamplesProxyHandler(request)[source]¶
Face sample proxy handler. See spec face samples.
Resource: “/{api_version}/samples/faces”
- luna_api.app.handlers.samples_handler.checkWarpedImage(byteImg, expectedSize)[source]¶
Check image is warp (checking size and type).
- Parameters:
byteImg – images
expectedSize – expected image size
- Raises:
VLException(Error.BadContentType, 400, isCriticalError=False) – if mime type is not ‘JPEG’
VLException(Error.BadWarpImageSize, 400, isCriticalError=False) – if image size is not valid
- Return type:
None