neural_compressor.ux.web.server
¶
Main endpoint for GUI.
Module Contents¶
Functions¶
|
Run webserver on specified scheme, address and port. |
|
Get TLS configuration. |
|
Block iframe and set others CSP. |
|
Block MIME sniffing. |
|
Validate authorization token. |
|
Serve JS application index. |
|
Handle API access. |
|
Allow for API access. |
|
Serve JS application index when no static file found. |
|
Disable cache on all requests. |
|
Build domain object from flask request. |
|
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.