Live data from Hacker News

A Beginner’s Introduction to Python Web Frameworks (2018)

stxnext.com

61–70 of 168 posts

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#61
post #20

Earlier quoted context omitted.

It's also a myth that Django makes it difficult to pick and choose. For example, this article fails to mention that Django includes support for alternative template engines, including the popular Jinja2. Of course, if you choose not to use a feature like the ORM, you won't get any of the benefits of that feature- but Django doesn't get in your way or make it difficult in any way to do so. You can use as many differen…

Everything you wrote is true, however I think using another ORM in Django is asking for trouble, or at least it's missing a lot of the benefit of Django. The way models work with admin, forms, etc is to me what makes Django so efficient. Also, you don't get much by switching Django templates to Jinja.

There are efforts in improving that in 3rd party libs such as django-sorcery [1] which attempts to add Django-like ORM experience but with SQLAlchemy and django-rest-witchcraft [2] which is adding DRF integration to SQLAlchemy models. Not everything Django ORM does is supported however a lot of useful functionality works as expected. For example nested resource updates in serializers in DRF works out of the box without needing to write custom logic unlike in vanilla Django ORM DRF. Whats surprising is that the libs dont do too much magic to make it all work and most of it fairly simply plugs into Django so its not as troublesome as people might want to believe to integrate other things in Django. Its actually a pretty nice framework. Anyways for full disclosure Im a contributor to the mentioned libraries so I could be a bit biased here :D

[1] https://pypi.org/project/django-sorcery/ [2] https://pypi.org/project/django-rest-witchcraft/

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#62
post #34

Earlier quoted context omitted.

That surprised me too. IMHO Tornado should be #3 after Django and Flask since AFAIK it has the best built-in support for writing hybrid HTTP/WebSocket servers in Python. I use Tornado to serve the WebSocket backend for https://www.slickdns.com/live/ . I've also used Django Channels to add WebSocket support to a Django app and found it very cumbersome compared to Tornado.

+1 For Tornado. I'm curious if you care for their templates or not, though.

Sorry, I haven't used Tornado's templates enough to compare them with e.g. Django's.

Essentially all I use Tornado for is to publish a WebSocket endpoint, and for that specific purpose it's great. For building conventional web apps I'm very happy with Django and its templates.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#63

This is a short list I have compiled a few months ago, FWIW: New kids on the block: - Starlette https://www.starlette.io - Vibora https://vibora.io - Xweb https://github.com/gaojiuli/xweb - Storm https://github.com/jiajunhuang/storm - Responder http://python-responder.org - Quart https://pgjones.gitlab.io/quart/ - Sanic https://sanic.readthedocs.io - Bocadillo https://bocadilloproject.github.io/ - Japronto https://gi…

Is there any python framework that optimizes for developer productivity?

Flask, and only Flask.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#64

This is a short list I have compiled a few months ago, FWIW: New kids on the block: - Starlette https://www.starlette.io - Vibora https://vibora.io - Xweb https://github.com/gaojiuli/xweb - Storm https://github.com/jiajunhuang/storm - Responder http://python-responder.org - Quart https://pgjones.gitlab.io/quart/ - Sanic https://sanic.readthedocs.io - Bocadillo https://bocadilloproject.github.io/ - Japronto https://gi…

This looks ridiculously like PHP back in what, 2011ish? Kohana, Cake, Zend, etc etc etc. Ultimately they all collapsed into Laravel or Zend.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#66
post #12

I started working with Python around 2013 and I still consider Django the best framework to use. Yes Flask you can pick what you want to use but I have found the supporting libraries to be a bit outdated. Everytime I have used it I feel like I am just gluing together a lot of different pieces and it becomes messy. Django is constantly updated and I have little to no worries about security issues. Edit: And I have bee…

We have a legacy Django app at work. Coming from Rails and living in the npm eco-system for the past few years, Django to me seems like an anti-pattern framework in a death-spiral.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#67

Earlier quoted context omitted.

Flask is pretty good. Stays out of your way and does what a framework must, and has some extras for forms etc.. if you want to use them. Tornado is fun to use, but less resources and libraries.

I started working with Django when it was pre 1.0 (0.96), as it was explicit in nature compared to Ruby on rails in 2003-4. Subsequently I tried flask and recently async framework. Our team still use flask just for one reason, it's a thin layer over wsgi making it easier and once application or service grows it can disappear completely. So it has right level of abstraction making it between a library and framework an…

I traditionally like using the libraries not the Flask integrations (as in your sqlalchemy example) however I do find myself using Flask Admin and Flask-WTForms, since while they do have downsides and you have to commit to using them, they do a lot for you.

I haven't checked out CherryPy, I should next hobby project.

Gunicorn is awesome, uWSGI is also good and feels more "production" to me.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#68
I primarily use Flask for my research project. It was quick to pick up and honestly, I like a more barebones style - one of the reasons I use Sublime Text over IDEs. Plus Miguel Grinberg's tutorial is fantastic at getting you on your feet (though I'm still sour over changes compared to his original tutorial, more because its made it difficult to onboard new developers).

However, Pyramid's made some of the coolest shirts. http://pylonsproject.storenvy.com/collections/56570-all-prod...

Post reply on HN