Earlier quoted context omitted.
async is more beneficial for when code is primarily network bound. WSGI is thread based which comes with a higher overhead for task switching. So it’s just not as efficient for most web server tasks.
Ok I think I get it, but if your backend is say, making a single API call and sending that result back to the user, then there's no advantage to going async since the user has to wait for that network call anyways, right? Would you use this async then in instances where some of the API calls don't matter to your user?
A Beginner’s Introduction to Python Web Frameworks (2018)
111–120 of 168 posts
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#112This 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?
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#113This 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…
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#114Earlier quoted context omitted.
FastAPI (built on Starlette) essentially generates your OpenAPI docs for free via intuitive use of decorators and type hints/Pydantic models.
+1 for FastAPI. It also has really good documentation
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#115This 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?
"Developer productivity" is so vague, I'd regard it as weasely if it would be in a framework's description.
What's the developers aim and workflow? Depending on that, you can probably make an argument for most frameworks on the list.
- Django is your all-batteries included framework for standard CRUD with an integrated admin interface. For "average" jobs that feeds the productivity.
- But then you can make the argument that this approach gets in the way if you deviate from the norm, and Flask is the new productive toy.
- And isn't all the hubbub about a "pythonic" style getting in the way? Web2Py has some magic that might not be mainstream, but is just bound to ramp up productivity! (No experience myself, just using this for the argument and for nostalgia when every mention of it brought the main developer in the thread, arguing about this, just like redux today)
- But hey, man, we're all doing JS frontends and just need a web scale API. Erm, okay, then Django Rest Framework? The various Flask addons? FastAPI?
- I'm an ex-00s-Java developer who misses writing XML by hand. What's best for my productivity? Well, what about the endless joys of writing YAML by hand! Use connexion...
Salt this discussion with complaints about speed (charge of the Rust brigade), deployment hassles (Gophers emerge from the ground) and the collective "this isn't static and thus we're doooomed!" outcries (erm, Haskell?).
(And from the Waldorf & Statler balcony, enterprise programmers who get paid by the hour, laughing about "productivity")
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#116This is a great resource, and there are some neat inclusions like Falcon, but I find the main trouble when building python web apps is deployment. I always feel like I've duct-taped my carefully written app to the web-server.
Where have you deployed? I'm looking to switch for my Django website. I'd like something full-serve like Heroku, but Heroku doesn't work well with sqlite.
[0]: I know this is not best practice, but this is a small project and this is a hack that I fully know the tradeoffs for.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#117Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#118This 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…
Zope is probably the granddaddy of them all. Tried and failed miserably to use it 20 years ago.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#119Earlier 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)..
It's got wide feature coverage and excellent documentation.
I think maybe you're insinuating it's overly complex or hard to learn in which case come out and say that so we can engage with a specific assertion.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#120Earlier quoted context omitted.
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.
> Also, you don't get much by switching Django templates to Jinja. Well, you gain a lot of performance - as much as 10x depending on the complexity of your template. Also, Jinja is a lot less crippled than Django Templates (for example, you can't call a function/method with parameters in Django Templates).