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
5
votes
1 answer

How can you get real time copy progress of a large file with Python?

I've searched high and low, and each time I find something that looks promising it's not panned out. Ultimately I want to grab the real time progress of a file copy on a linux machine from inside python. I'll take that progress and emit it to a…
Kenny Powers
  • 1,254
  • 2
  • 15
  • 25
5
votes
3 answers

Custom handshake data with Flask-SocketIO

I have a Python server using Flask, that has a websocket connection using Flask-SocketIO . There is a similar question : Send custom data along with handshakeData in socket.io? The idea is to do the same thing but instead of using Node, using…
5
votes
1 answer

Using Flask-SocketIO with Flask-Login and HTTP Basic Auth

I'm trying to implement a really simple webpage for internal monitoring. It is supposed to display some data, which is updated in real-time via socketio. The server runs a thread in the background, which fetches the data and relays it to the…
5
votes
1 answer

Restarting Supervisor and effect on FlaskSocketIO

In my index.html (HTML/Javascript) I have: $(document).ready(function(){ namespace = '/test'; var socket = io.connect('http://' + document.domain + ':' + location.port + namespace); socket.on('connect', function() { …
user2268507
5
votes
1 answer

using flask-migrate with flask-script, flask-socketio and application factory

I'm creating an flask application with the application factory approach, but have an issue when using Flask-Migrate with socketio and flask-script. The problem is that I'm passing my create_app function to the Manager but I need to pass the app to…
Zyber
  • 1,034
  • 8
  • 19
5
votes
1 answer

Flask-SocketIO Not Working On Apache/WSGI

I have used the following example code from http://blog.miguelgrinberg.com/post/easy-websockets-with-flask-and-gevent/page/4 and this works fine when I run it using the test server e.g. python myapp.py I can connect to it and send messages from…
user4143585
  • 105
  • 1
  • 2
  • 6
5
votes
1 answer

flask-socketio one room per user ? expensive?

I have a flask webapp running pandas to do some data analysis on the backend. Right now, i took the naive approach of using AJAX for user to send queries back to the server and interact with the data. but as it turns out there is a lot of overhead…
Shankar ARUL
  • 12,642
  • 11
  • 68
  • 69
5
votes
1 answer

emitting from thread using flask's socketio extension

I want to emit a delayed message to a socket client. For example, when a new client connects, "checking is started" message should be emitted to the client, and after a certain seconds another message from a thread should be emitted.…
Muatik
  • 4,011
  • 10
  • 39
  • 72
4
votes
1 answer

Websocket Connection Error Insufficient Resources

I'm developing a chat app where two users can talk to one another and I'm doing this with flask-socketio and React. I've been struggling with trying to figure out this issue I'm getting with socket.io. Here's the error connection I keep getting once…
Ron
  • 41
  • 1
  • 1
  • 2
4
votes
1 answer

Nginx, flask-socketio - blocked by CORS policy

I have a flask-socketio server running on ubuntu with nginx. I have a client calling the server. When I try to call the server I receive the following error: has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains…
Itai Elidan
  • 272
  • 9
  • 27
4
votes
2 answers

SocketIO to emit to a particular user (without using separate room for every client)

I am trying to develop a web application that supports a long task at the backend. I am using flask-socketio package on my server along with celery. My workflow is following : When a client opens the Html page -- I initiate a socket connection to…
Naman
  • 372
  • 4
  • 20
4
votes
2 answers

Web LiveStreaming WebRTC and Sockets (Flask Backend)

I want to build a live streaming app. My thought process: Get the Video/Audio data from the navigator.mediaDevices.getUserMedia(constraints); [client-streamer] create rooms using sockets(Socket.IO or WebSockets from flask) [backend] Send the data…
Sahar Cohen
  • 51
  • 1
  • 3
4
votes
3 answers

App engine, Flask-Socketio server Cors_Allowed_Origins header is missing

When I try to send a request from the client to my socketio flask server that is deployed on app engine I recieve the following error: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. I…
4
votes
3 answers

flask_socketio import wont work, error: No module named flask_socketio

Im trying to create connection between flask socketio and react native socketio, I have already prepared client side with react native socketio BUT I have run into problem with importing flask_socketio in rpi. Im trying to use simplest…
ersi
  • 207
  • 1
  • 2
  • 11
4
votes
0 answers

Flask_Socketio & Eventlet Error: Client is gone, closing socket

I'm trying to setup my first flask_socketio application and have run into a problem where the client will randomly disconnect from the server. I have a custom function in the app named "propertytaxes" this function is performing as expected…
Gugmi
  • 315
  • 1
  • 3
  • 9