from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost', 3000) socketIO.emit('toggle')