Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python tornado setup

Tags:

python

tornado

I want to use a Python framework that handles sessions (user auth), templating along with MySQL database access (although I can use MySQLdb quite nicely)

Tornado looks promising but, I just can't see how to use it. The sample given has a port listen feature. Does it replace Apache? Exactly how do I configure my server (Centos 5.4) and LAMP setup for this, or is there a better option?

like image 831
khany Avatar asked Feb 16 '11 00:02

khany


3 Answers

If you are using tornado for production, you can follow their nginx setup guide.

like image 81
vikash dat Avatar answered Nov 09 '22 08:11

vikash dat


Use Django.

I'm a hardcore Tornado fan but if you need to ask, Django is the best tool for you. Tornado is great but Django is much easier to build when you need a MySQL database thanks to its awesome ORM.

like image 1
Peter Bengtsson Avatar answered Nov 09 '22 09:11

Peter Bengtsson


if you using tornado for websockets you can use ha-proxy for proxying socket request to tornado (ngnix not support this)

like image 1
yessi Avatar answered Nov 09 '22 08:11

yessi