by codegeek · 10y ago · 0 comments
My belief is that when you are learning, start with a minimal framework so that not everything is already done for you a.k.a magic. That will make you think and make some choices. Sure it may be amateur choices in the beginning but you will become a better developer. So if you want to learn python for web, go with Flask.
So having used both, I'd nitpick you on this assertion.
from flask import request
to get at the individual request objects is sooooo much more magical than def my_view(request):
(IMO)Nevertheless, it's a good framework!
It's quite nice that you can just do
@route("/<post_id>")
def my_view(post_id):
....
never having to register anything and just decorating your functions with these path decorators gets you started really really fast. That's how a flask hello world is just 6 LOC and `python ./my_server.py`.