neural_compressor.ux.web.service.response_generator

Response generator.

Module Contents

Classes

ResponseGenerator

Response generator class.

class neural_compressor.ux.web.service.response_generator.ResponseGenerator

Response generator class.

static serve_from_filesystem(path: str, mimetype: str | None = None, as_attachment: bool | None = False) werkzeug.wrappers.Response

Serve any file from filesystem.

static add_refresh(response: werkzeug.wrappers.Response, refresh_time: int) werkzeug.wrappers.Response

Add Refresh header to response.

static from_exception(exception: Exception) werkzeug.wrappers.Response

Create Response from Exception.

static get_status_code_for_exception(exception: Exception) int

Get HTTP status code for Exception.