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 shi…
A Beginner’s Introduction to Python Web Frameworks (2018)
121–130 of 168 posts
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#122I was forced to encounter Web2Py in an open-source project several years ago. It was awful. Besides the fact that it's stuck in Python 2 (seriously, even today?), it had a lot of bizarre design decisions. For instance, it loaded controllers by concatenating files in a directory - alphabetically. I know Python's import system can confuse some folks, but surely there was a better way. The whole thing left a very sour t…
I LOVE Web2py! I use it for pretty much all of my projects. It is the only Python framework that is super easy to use, has enough "batteries included" but not too much, super simple and super powerful templating, decent migrations, simple data access layer not complicated ORM, no import hell, implicit routing. Developer has a new effort underway that is a little more "pythonic": https://github.com/web2py/py4web
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#123Are any of these extremely good compared to a framework not written in Python? For example compared to Rails or Phoenix?
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#124Django is incredible - I wish I'd started with it. It's truly the most useful framework I've ever used - a real workhorse for building applications.
Flask and bottle are minimalist and get the job done for focused tasks - for example I hacked together various web examples into an mjpeg server recently used Flask (based on Miguel Grinberg's webcam server). You can get a simple web site up and running in 3 minutes with bottle or Flask. I'd recommend against using them for anything bigger though - you'll just spend all your time reinventing Django (badly).
I use Sanic for asynchronous web servers.
Falcon is great to use to build APIs - it's raw and minimal and built to task.
Indeed in my latest project I use Django for the main web application, Flask for the mjpeg server and sanic as a long polling web server acting as a message queue server.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#125Beginner's guide to choose a Python web framework: Django.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#126Of these frameworks, Pyramid is the only one I know of that uses the concept of traversal. Traversal is an elegant way to tame big projects. Whenever I look at a web framework, I look for traversal and I'm always a little disappointed to see it's missing. Traversal means the framework treats each path segment in the URL as a possible branch in a tree of resources provided by the app. After completing traversal, the f…
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#127I started Python programming 8 or 9 years ago and went from bottle to flask to Falcon to Django to Sanic. Django is incredible - I wish I'd started with it. It's truly the most useful framework I've ever used - a real workhorse for building applications. Flask and bottle are minimalist and get the job done for focused tasks - for example I hacked together various web examples into an mjpeg server recently used Flask…
It is not true when you recommend don't use flask or bottle for large apps. On the contrary it will be good for large projects to use minimalist framework as they will act more like library. Also you can write code yourself for the parts in the system which outgrow the framework. My team has built large production level application for machine learning service initially in Django and then later ported completely to flask. Given we don't use templates and jinja2 as most of the front-end is in SPA, flask has been wonderful to work with. Django rest framework doesn't work that well when you just need to work directly with request/responses. Blueprints made it so easy to write large modular code that choice between monolith and micro-service, just a configuration setting coupled with either gunicorn or uwsgi in emperor mode.
All Python framework under the hood are WSGI or ASGI, so a decent Python programmer can use excellent marshmallow, sqlalchemy, alembic, celery and flask (or others) with blueprints to write a performant large modular application and a service layer.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#128Earlier quoted context omitted.
Django's tagline is "The Web framework for perfectionists with deadlines".
.. That comes with a brief documentation of 1941 pages (as of August 20, 2019)..
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#129This 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…
Any of those have good Swagger integration? https://swagger.io/