neural_compressor.ux.web.server

Main endpoint for GUI.

Module Contents

Functions

run_server(→ None)

Run webserver on specified scheme, address and port.

get_tls_args(→ dict)

Get TLS configuration.

block_iframe(→ werkzeug.wrappers.Response)

Block iframe and set others CSP.

block_sniffing(→ werkzeug.wrappers.Response)

Block MIME sniffing.

require_api_token(→ Any)

Validate authorization token.

root(→ Any)

Serve JS application index.

handle_api_call(→ Any)

Handle API access.

allow_api_call(→ Any)

Allow for API access.

page_not_found(→ Any)

Serve JS application index when no static file found.

disable_cache(→ werkzeug.wrappers.Response)

Disable cache on all requests.

build_parameters(...)

Build domain object from flask request.

web_socket_publisher(→ None)

Send messages from queue via web-socket to GUI.

neural_compressor.ux.web.server.run_server(configuration: neural_compressor.ux.web.configuration.Configuration) None

Run webserver on specified scheme, address and port.

neural_compressor.ux.web.server.get_tls_args(configuration: neural_compressor.ux.web.configuration.Configuration) dict

Get TLS configuration.

neural_compressor.ux.web.server.block_iframe(response: werkzeug.wrappers.Response) werkzeug.wrappers.Response

Block iframe and set others CSP.

neural_compressor.ux.web.server.block_sniffing(response: werkzeug.wrappers.Response) werkzeug.wrappers.Response

Block MIME sniffing.

neural_compressor.ux.web.server.require_api_token(func: Callable) Any

Validate authorization token.

neural_compressor.ux.web.server.root() Any

Serve JS application index.

neural_compressor.ux.web.server.handle_api_call(subpath: str) Any

Handle API access.

neural_compressor.ux.web.server.allow_api_call(subpath: str) Any

Allow for API access.

neural_compressor.ux.web.server.page_not_found(e: Any) Any

Serve JS application index when no static file found.

neural_compressor.ux.web.server.disable_cache(response: werkzeug.wrappers.Response) werkzeug.wrappers.Response

Disable cache on all requests.

neural_compressor.ux.web.server.build_parameters(endpoint: str, request: flask.Request) neural_compressor.ux.web.communication.Request

Build domain object from flask request.

neural_compressor.ux.web.server.web_socket_publisher(web_socket: flask_socketio.SocketIO) None

Send messages from queue via web-socket to GUI.