Does Windows Azure support Tornado?

Mar 8, 2013 at 3:38 AM
Hi,

Azure supports Python and I see a sample of using Django on Windows Azure. Does Azure also support Tornado (https://github.com/Introduction-to-Tornado/Introduction-to-Tornado)? Can anyone give me any hints on it? Thank you in advance!
Coordinator
Mar 8, 2013 at 5:45 AM
Edited Mar 8, 2013 at 5:46 AM
From the Azure side there's nothing built in specifically to handle any Python web framework - instead any WSGI compliant framework should work.

To get started you should be able to follow the instructions for Django over here: http://www.windowsazure.com/en-us/develop/python/tutorials/web-sites-with-django/ But instead of including Django in your web site you include Tornado.

Then when configuring the web site you need to specify a WSGI_HANDLER setting, which based upon http://www.tornadoweb.org/documentation/wsgi.html, I suspect would look like:

mytornado.py:
{{
import tornado.web
import tornado.wsgi
import wsgiref.simple_server

class MainHandler(tornado.web.RequestHandler):
    def get(self):
         self.write("Hello, world")

application = tornado.wsgi.WSGIApplication([
     (r"/", MainHandler),
])
}}

and you specify WSGI_HANDLER as "mytornado.application"

I think after Alpha we'll also have a feature to support generic web frameworks which will wrap this all up inside of Visual Studio and use our new virtualenv support to include other web frameworks like tornado. But for now you should be able to do this all w/ Git from the command line.
Mar 8, 2013 at 12:50 PM
Thanks so much, Dinov! Your reply is quite useful and informative.