Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combine python flask and express.js

I have a web application where the site is built with Python Flask. Now we want to introduce a real time chat system in a page. Is it advisable to mix both flask and express.js, or develop only the chat page using express.js and the rest with Flask, or do we have any Framework like express.js in python that can work along with flask?

like image 751
Ananth Duari Avatar asked Jan 19 '23 01:01

Ananth Duari


2 Answers

In python you can use
http://twistedmatrix.com/trac/
http://www.gevent.org/
http://eventlet.net/

Look into this
http://librelist.com/browser//flask/2010/9/1/flask-and websockets/

Twisted has huge support and lot of success projects are built based upon it. gevent is light when compared to twisted.

Look into this comparison http://oddments.org/?p=494

like image 85
Kracekumar Avatar answered Jan 22 '23 05:01

Kracekumar


Try Socket.io with backend https://github.com/SocketTornadIO/SocketTornad.IO this way you keep your sever python all the way.

It's also ok if you mix Node.js with python, but you'll have 2 servers up and running.

like image 40
clyfe Avatar answered Jan 22 '23 07:01

clyfe