The Python Oracle

Flask socket IO emit from another module

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: A Thousand Exotic Places Looping v001

--

Chapters
00:00 Flask Socket Io Emit From Another Module
01:55 Answer 1 Score 2
02:12 Thank you

--

Full question
https://stackoverflow.com/questions/5932...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #flask #socketio #flasksocketio

#avk47



ANSWER 1

Score 2


Please try and install Redis and eventlet for asynchronous calls and to send messages from other modules. As described in the documentation then you can change your line in app.py to

socketio = SocketIO(app, cors_allowed_origins="*", message_queue='redis://', async_mode='eventlet')