Questions tagged [flask-socketio]

Flask-SocketIO lets Flask python applications access low latency bi-directional communications between the clients and the server

Flask-SocketIO is an open source library which implements the abstraction, for delivering low latency client-server communication in a application developed by Miguel Grinberg.

1052 questions
3
votes
0 answers

Most elegant way to execute CPU-bound operations in asyncio application?

I am trying to develop part of system that has the following requirement: send health status to a remote server(every X seconds) receive request for executing/canceling CPU bound job(s)(for example - clone git repo, compile(using conan) it..…
nonamer92
  • 1,887
  • 1
  • 13
  • 24
3
votes
1 answer

python socketio communication with ssl related problem

I am using python socketio for communication and it works well for http. Have a problem when upgraded it to work with SSL. I made a self-signed root certificate (CA), and issued server.cert and server.key. I told the computer to trust the CA. After…
Tyrion
  • 405
  • 8
  • 22
3
votes
2 answers

Can't get multiple uwsgi workers to work with flask-socketio

In development, flask-socketio (4.1.0) with uwsgi is working nicely with just 1 worker and standard initialization. Now I'm preparing for production and want to make it work with multiple workers. I've done the following: Added redis message_queue…
Michielvv
  • 336
  • 4
  • 13
3
votes
1 answer

Setting up dynamic chat rooms in FlaskSocketIO chat

I want to let user's of my mini chat to create their rooms dynamically. For now i got const in flask server app: # Predefined rooms for chat ROOMS = ["Lounge", "news", "games", "coding", "food", "cars"] And user join/leave routes are in…
Szegerege
  • 59
  • 1
  • 7
3
votes
2 answers

Flask-SocketIO is Running under Werkzeug, WebSocket is not available. What does this mean?

when i run flask for SocketIO, i get the following on my cmd: WARNING in __init__: Flask-SocketIO is Running under Werkzeug, WebSocket is not available. What does it mean?
chia yongkang
  • 786
  • 10
  • 20
3
votes
2 answers

Invalid session / Session is disconnected

What can be the reasons that cause a socket.io session to be crashed and server returns invalid session or session is disconnected ?
3
votes
2 answers

Ensuring socket messages were sent using flask-socketio, redis

I have a flask-socketio server running on multiple pods, using redis as a message queue. I want to ensure that emits from external processes reach their destination 100% of the time, or to know when they have failed. When process A emits an event to…
3
votes
1 answer

socketio.emit() when UDP packet received

I have a flask-socketio server that serves index that shows received messages on webpage. The server receives messages trough ZMQ or basic UDP in their own threads. In the same threads it emits the messages to webpage but only the ZMQ thread message…
Ondra
  • 43
  • 5
3
votes
1 answer

Flask-SocketIo, How to share data between python thread and socketio.start_background_task thread?

Goals: socketio.run(app) launches the server and use a while loop to emit data infinitely to multiple javascripts (clients). The data comes from another while loop, but the loop needs to start once the script runs(independent from the clients…
ctheadn8954
  • 129
  • 1
  • 8
3
votes
1 answer

SocketIO with Flask for specific page of a website

I'm having a flask website with different apps in different routes: @app.route('/') def index(): ...... @app.route('app1') def app1(): ...... return render_template('app1.html') @app.route('app2') def app1(): ...... return…
Jie Hu
  • 539
  • 1
  • 5
  • 16
3
votes
1 answer

Flask - SocketIO hidden behind reverse proxy with Nginx

I want to integrate Flask-SocketIO with my Flask project. My app is running behind a Nginx reverse proxy: location /plivo_api{ rewrite ^/plivo_api(.*) /$1 break; proxy_pass http://127.0.0.1:8090; } So I undestand all trafic received…
Freddy
  • 779
  • 1
  • 6
  • 20
3
votes
1 answer

Flask API Callback Listener

I'm new to Flask and working on creating a web application that will listen and monitor for status updates with callback urls from our API. If a particular event is performed, the application will download the files in a pdf format. The application…
Nathan
  • 483
  • 4
  • 7
  • 19
3
votes
1 answer

WebSockets with nginx + uwsgi + flask-socketio

I'm trying to establish a websocket connection using socket.io on the frontend and Flask-Socketio on the backend. However, the frontend is giving me the error WebSocket connection to…
Austen
  • 418
  • 6
  • 11
3
votes
1 answer

Accessing to application context in flask socketio background task

I am developing a Flask application with Flask-SocketIO library to real time communication between a server background task and clients. I need to access to my database inside the background task and I don't know how to achieve it as no application…
j2logo
  • 649
  • 4
  • 9
3
votes
2 answers

flask-socketio does not work on aws with eventlet installed

I am currently having an issue running a Flask application using flask-socketio with eventlet. When I push to AWS without eventlet my application works perfectly. This is great, however I want my application to be production ready and running…
Fredmental
  • 445
  • 1
  • 7
  • 14