which python web framework(django or django-norel or pyramid) to use when MongoDB is used as a database which python web framework(django or django-norel or pyramid) to use when MongoDB is used as a database django django

which python web framework(django or django-norel or pyramid) to use when MongoDB is used as a database


A year or two ago I was also deciding between django and pyramid w/ mongodb to build a high performance web application. I ultimately chose Pyramid :

Pros:

  • Pyramid is very light weight for a full stack framework. There is a minmal amount of 'magic' going on under the hood. I was able to wrap my head around all the pieces.
  • It is not as opinionated as Django. You can plug and play whatever templating engines or databases you need relatively easily.
  • I was impressed by the performance benchmarks between Pyramid over other full stack frameworks.
  • The Pylons/Pyramid culture of 100% code coverage and "only pay for what you eat" was appealing to my own development style.

Cons:

  • The community is growing, but still not as mature as Django
  • There's a lot of documentation, but it's not as robust as some of the Django docs out there
  • The lack of 'magic' and beginner friendly documentation make for a steeper learning curve.

As for using an ORM with MongoDB; I recommend you try building without one at first. After trying a few mongodb ORMs, I've ended up going back to plain pymongo with Colander or Validictory for validation. Pymongo is already very ORM-like, fast, and flexible. I felt the extra layers of abstraction took away from that flexibility, and caused me to write more code than was needed.


I'm going to suggest an alternative that has not been mentioned: Flask. Flask has a really great (albeit smaller than Django) community and there are a lot of extensions available for common web-app extensions, in the extensions directory.

There are several MongoDB extensions for Flask, which help to integrate MongoDB into the framework, but I would also highly recommend the mongoengine ORM. One of the people working on mongoengine has release an extension for Flask integration, Flask-MongoEngine.


Try it all (Django, Pyramid, Flask), read the docs, and you done.If you will select Django, you will not use some parts of it (orm, formlib), and that is all.

ALso see this video:https://www.10gen.com/presentations/mongosf-2011/mongodb-with-python-pylons-pyramid