Search code examples
pythondjangopylonscherrypy

Python Web Framework for Small Team


I have 4 days off and I will use this time to rewrite our RoR (Ruby on Rails) Application in a python web framework just for fun ;-] (and why not make the switch, RoR is great but keep changing all the time, can be exhausting.)

I don't know the python web framework very well, I've glad web.py, django, cherry.py, pylons/pyramid and few others. Our requirements are (put everything can be irrelevant) :

  • MVC (Strict or not)
  • Small Team (2-3 people included one designer)
  • Fun to use
  • REST support
  • Multilevel caching (DB query, page cache)
  • Nginx Support (X-Accel-Redirect File Download)
  • Heavy traffic (1,200,000 ~ views)
  • Urls rewrting (Multi-domains support not only subdomain)
  • Not a problem if it's not hype
  • Not a problem if there is no plugins
  • Either SQL or NOSQL (can be fun to try NOSQL)

So what you would advise ?


Solution

  • I think most of the big frameworks will fit your requirements so maybe you might look at it from the perspective of the app you are writing. How much do you want to work "out of the box". Will you need user management? Will you need an admin panel etc.

    I use Django and it's great when you don't want to rewrite a lot of boilerplate. It can be a bit tedious at times trying to bend it to do what you want, but once you get your head around it's intricacies , you can get things done very quickly.

    With Django anyway:

    • MVC (Strict or not)

      Not MVC, but similar > http://www.djangobook.com/en/2.0/chapter05/#cn16

    • Small Team (2-3 people included one designer)

      not sure how the framework will effect this, but yes, it's quick to develop on your own or with a team via version control

    • Fun to use

      well there's a lot of great documentation, so less time is spent pulling your hair out, and you can get going very quickly which is nice

    • REST support

      Yes, as a library: > https://bitbucket.org/jesperndjjango-piston/wiki/Home

    • Multilevel caching (DB query, page cache)

      Yep > https://docs.djangoproject.com/en/dev/topics/cache/?from=olddocs

    • Nginx Support (X-Accel-Redirect File Download)

      Again, not sure this is relevant, but yes. I use nginx with UWSGI and it's very quick

    • Heavy traffic (1,200,000 ~ views)

      Yes > Does Django scale?

    • Urls rewriting (Multi-domains support not only subdomain)

      Not sure about this

    • Not a problem if it's not hype

      It's no node-js, but again, lots of really good documentation

    • Not a problem if there is no plugins

      There are .... my god there are

    • Either SQL or NOSQL (can be fun to try NOSQL)

      SQL out of the box, but NOSQL is supported > http://www.allbuttonspressed.com/projects/django-nonrel