Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
Is there a way to catch socket.io events without JavaScript in Flask?

My application handels a countdown, which refreshes all the time. The countdown itself is handeld by the server, like so:

@socketio.on("update-countdown")
def update_countdown():
   # do some stuff here to gather countdown
   socketio.emit("update-countdown", countdown)

Currently I am catching the event data in JavaScript like this:

var socket = io.connect();

var countdown_wrapper = document.getElementById("countdown");
socket.on("update-countdown", function(countdown) {
   countdown_wrapper.innerHTML = countdown;
});

Q.: Is there a way to catch socket.io events without JavaScript? If so, how could I do this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you are looking to replace javascript with python within your web browser's client-side code, you might want to look into https://brython.info/

It is essentially just using python within the browser. You wouldn't have all of those fancy decorators, but it would probably work well enough.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!