Any open source project which are pure tornado?

507 views
Skip to first unread message

avi

unread,
Sep 22, 2014, 9:25:25 AM9/22/14
to python-...@googlegroups.com
By pure I mean, they use Tornado for everything including templating and also tornado's IO Loop. 

I found A. Jesse Jiryu Davis' motor-blog app: https://github.com/ajdavis/motor-blog

But are there any bigger projects which use Tornado? 

I want to learn how to structure the tornado apps which have many handlers. Thank you.

A. Jesse Jiryu Davis

unread,
Sep 22, 2014, 9:46:00 AM9/22/14
to python-...@googlegroups.com
Definitely don't treat Motor-Blog as a paragon of software architecture. It's pretty hacky and needs cleanup. =)

--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ben Darnell

unread,
Sep 22, 2014, 9:50:50 AM9/22/14
to Tornado Mailing List
On Mon, Sep 22, 2014 at 9:25 AM, avi <avinas...@gmail.com> wrote:
By pure I mean, they use Tornado for everything including templating and also tornado's IO Loop. 

I found A. Jesse Jiryu Davis' motor-blog app: https://github.com/ajdavis/motor-blog

But are there any bigger projects which use Tornado? 

Here's the code from my previous startup: https://github.com/viewfinderco/viewfinder/

The python code is in the backend directory.
 

I want to learn how to structure the tornado apps which have many handlers. Thank you.

There's no right or wrong way to do this; it depends on what fits the project best. Viewfinder had one main handler (backend/www/service.py) that nearly everything passed through which then delegated to a bunch of non-handler functions. 

selam

unread,
Sep 22, 2014, 10:08:09 AM9/22/14
to Tornado Web Server
I create very basic and very hacky way to use many handlers in my project, i give you an example maybe it helps to your project..


mkdir handlers

write all handlers inside handlers like 

handlers/user.py

import tornado.web

class  RegisterHandler(tornado.web.requestHandler)
    ROUTE = "/user/register"

   def get(self):
       ...
   def post(self):

class LoginHandler(tornado.web.requestHandler):
   ROUTE = "/user/login"

   def get(self):
    ...
   def post(self):
    ....


handlers/__init__.py

import sys
import inspect
import user

ROUTES = []

MODULES = [
     user
]

for module in MODULES:
    members = inspect.getmembers(sys.modules[module.__name__], inspect.isclass)
    for cls in members:
        if hasattr(cls[1], "ROUTE"):
            ROUTES.append((r"%s" % (cls[1].ROUTE,), cls[1]))
    

and in projectname.py

import handlers
import tornado.web

class Application(tornado.web.Application):
    def __init__(self):
        settings = {
         ....
        }

        tornado.web.Application.__init__(self,  handlers.ROUTES, **settings)

.....




--
Saygılar && İyi Çalışmalar
Timu EREN ( a.k.a selam )

Kyle Kelley

unread,
Sep 22, 2014, 10:20:04 AM9/22/14
to python-...@googlegroups.com
Hey Avi,

Check out IPython (http://ipython.org/). It's all tornado for the main notebook application.


In particular, you want the notebook server which lives under IPython/html: https://github.com/ipython/ipython/tree/master/IPython/html

GitHub code search is your friend in finding all of them, but the large majority of the handlers are here (including the base classes): https://github.com/ipython/ipython/blob/9a0ef7371060d61415f02526caaa3916a6083d28/IPython/html/base/handlers.py

-- Kyle


--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Josh Przybylko

unread,
Sep 22, 2014, 12:23:58 PM9/22/14
to python-...@googlegroups.com
Hi,
I haven't taken a good look at the code yet, but the following appears to be a decent "almost pure" tornado project that is up to date:

It looks as if the friendly folk at Red Hat have ported their node based collab tool, Cantas, to tornado.

"Cantas is a real-time collaborative web application.This is a side project, used as internal productivity tool in Red Hat.

I am not sure why they used socket.io/tornadio2 instead of sockJS however?

Thanks for posting the other examples

David Nellessen

unread,
Sep 22, 2014, 12:26:20 PM9/22/14
to python-...@googlegroups.com
Here a rather small Tornado project of mine, an URL shortener service with an API similar to bitly: https://github.com/nellessen/tornado-shortener

avi

unread,
Sep 22, 2014, 1:58:02 PM9/22/14
to python-...@googlegroups.com

rande

unread,
Oct 6, 2014, 5:45:02 PM10/6/14
to python-...@googlegroups.com
Hello,

I have been coding a small CMS with tornado: https://github.com/rande/python-element, the documentation is available here: http://python-element.readthedocs.org/en/latest/

It is a pet project but it working well on http://thomas.rabaix.net/under-the-hood

aliane abdelouahab

unread,
Oct 6, 2014, 5:47:42 PM10/6/14
to python-...@googlegroups.com
and ecommerce simple website (tornado, motor)

Phyo Arkar Lwin

unread,
Oct 6, 2014, 6:01:38 PM10/6/14
to python-...@googlegroups.com
This is very interesting collab tool. Thanks alot for sharing.
Also , Very Very interesting web based terminal client , GraphTerm is 100% tornado!

You've got to try it, very powerful , can view alot of file formats inside terminal directly.  

Phyo Arkar Lwin

unread,
Oct 6, 2014, 6:09:02 PM10/6/14
to python-...@googlegroups.com
We are also building something similar to Reddit + Discourse , Social Media sharing, but with Chat (comment sytle chats) , can share/upload and view a lot of media types .
It also includes voice chat and video viewer. Its 100% pypy + tornado on serverside and  qxdoo + html5 technologies ( qooxdoo.org )
I am thinking to  opensource it when we ready.

aliane abdelouahab

unread,
Oct 6, 2014, 6:10:55 PM10/6/14
to python-...@googlegroups.com
by the way, here is the demo
the project is not a big deal, but can be helpful for some code...
Reply all
Reply to author
Forward
0 new messages