mdvtools.websocket#

Attributes#

Classes#

SocketIOContextRequest

Represents the Flask request object when in a Flask-SocketIO event context.

Functions#

log(msg)

mdv_socketio(app)

Experimental and not to be trusted pending design work etc.

Module Contents#

mdvtools.websocket.log(msg: str)[source]#
mdvtools.websocket.socketio: flask_socketio.SocketIO | None = None[source]#
class mdvtools.websocket.SocketIOContextRequest[source]#

Bases: flask.Request

Represents the Flask request object when in a Flask-SocketIO event context. This protocol ensures the ‘sid’ (session ID) attribute is recognized by type checkers.

sid: str[source]#
mdvtools.websocket.mdv_socketio(app: flask.Flask)[source]#

Experimental and not to be trusted pending design work etc.

Do we have a SocketIO for the entire app and route messages internally, - yes probably. What path should it use? We’ll need to make sure it is compatible with - the vite dev server proxy - the app not being at the root of the domain

!! What about cors? We had a wildcard for previous experiment - should be reviewed before getting pushed online.#