Python web platform for a small team

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

I don't know the python framework very well, I am happy with web.py, django, cherry.py, pylons / pyramid and several others. Our requirements (everything may be irrelevant):

  • MVC (Strictly or not)
  • Small team (2-3 people included one designer)
  • Nice to use
  • REST support
  • Multilevel caching (DB query, page cache)
  • Nginx support (download X-Accel-Redirect file)
  • Heavy traffic (1,200,000 ~ views)
  • URL transfer (support for multiple domains, not only subdomains)
  • Not a problem if it's not an advertisement
  • Not a problem if there are no plugins
  • Either SQL or NOSQL (it may be interesting to try NOSQL)

So what would you recommend?

+4
source share
5 answers

I think that most of the large frameworks will meet your requirements, so maybe you can look at it from the point of view of the application you are writing. How much do you want to work out of the box. Do you need user management? You need an admin panel, etc.

I use Django, and it’s great when you don’t want to rewrite a lot of templates. Sometimes it can be a little tedious, trying to bend it to do what you want, but as soon as you are deceived around this subtlety, you can do it very quickly.

With Django anyway:

  • MVC (Strictly or not)

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

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

    I’m not sure how this will affect the infrastructure, but yes, it is rapidly developing independently or with the team using version control

  • Nice to use

    well there is a lot of excellent documentation, so less time is spent stretching your hair, and you can quickly go, 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 (download X-Accel-Redirect file)

    Again, not sure if this is relevant, but yes. I use nginx with UWSGI and it is very fast

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

    Yes > Is the Django scale?

  • Rewriting addresses (support for multiple domains, not only subdomains)

    Not sure about it

  • Not a problem if it's not an advertisement

    This is not node-js, but again, a lot of really good documentation

  • Not a problem if there are no plugins

    There is ... my god is

  • Either SQL or NOSQL (it may be interesting to try NOSQL)

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

+4
source

In addition to the other frameworks mentioned (which are good options) you should check out web2py . It is a functional, full-featured infrastructure that is very easy to configure, learn, and use. It was originally inspired by Ruby on Rails, so if you are rewriting a RoR application, you may find it more convenient than some other Python structures. Here are some details regarding your requirements:

The framework is under very active development (new releases every 2-4 weeks), but it aims to maintain backward compatibility, so existing applications will not be interrupted during the update. If you have any questions, you will get a lot of help from the friendly and responsive mailing list .

+3
source

I would recommend DJANGO or TurboGears.

+1
source

I don’t think that you can go wrong with any of the main web frameworks. Personally, I used Django the most and I will describe in this way, ORM is really wonderful, and its philosophy / design is closely related to my personal preferences. However, if you want to go a different route, bottle is a really fun microframe, I am happy to develop with. If you want to go on a NoSQL route, MongoDB has excellent Python support. PyMongo is great (and the recommended way to use MongoDB from Python), MongoEngine is a nice little ORM (if you want it).

0
source

Of the frameworks you talked about, Django has the most momentum and is likely to fit your framework ideals based on the Rails background. By this I mean that he has helpers that allow you to quickly generate your forms, although no forests. (Actually, the Django path is slightly better than the forests in Rails, because you can use all or just parts of it)

It has a good ORM with many helper methods and, one of the best features, it has a fully functional admin interface as soon as you define your models. You can start transferring data even during site development.

It also provides excellent user support, including permissions, access control, groups, user profiles.

It’s easy (and fun) to create your own mid-range and context-sensitive processors that allow you to abstract away from commonly used parts as plugins in the framework.

The only feature that Django has not mentioned above is NoSQL support. And this is only half true. If you want to use a non-relational database for some parts of your application, for example, to store sessions, you can. If you want to use it as your exclusive backend, you will lose some of Django's awesome features if you did not install Django with django-nonrel .

I used turbo gears, which are a combination of several other options that you talked about. There are great people in this community, but they are currently undergoing a major architecture upgrade and, frankly, they just don't pay as much attention to the developer as Django does.

0
source

All Articles