8 ms·
Aha, this article is by the creator of Quart[0]! I'm a big fan - one of my favorite new python packages. It's essentially a super zippy, flask-compatible asynci
by bpicolo 8y ago
Aha, this article is by the creator of Quart[0]! I'm a big fan - one of my favorite new python packages. It's essentially a super zippy, flask-compatible asyncio python server. I switched a flask app over recently and saw an immediate 10-20x throughput gain (the app is entirely io-bound). pgjones was a pleasure to work with when I had a few issues and had to contribute a few compat fixes as well. Thanks for the awesome package!
[0]: https://gitlab.com/pgjones/quart/ https://gitlab.com/pgjones/quart/
- pgjones 8y agoWow, any chance you could write up the throughput gain? It would be great to see some real production numbers. Thanks for the comments.
- bpicolo 8y agoIt's an internal dashboard, so that was a stress testing figure - afraid it wouldn't be a terribly interesting write up. It was still exciting for me, because I'd been looking for more or less flask-with-asyncio for quite some time.
- hultner 8y agoI’ve looked at quart and it looks interesting but is there much point to running an async webserver for APIs mainly reliant on db-access if we use SQLAlchemy for database connections? I’m under the impression that since the db stuff still is sync/blocking we won’t win much by running an asgi server instead of WSGI.
- bpicolo 8y agoGive peewee-async as shot if you'd like async DB access as well. https://peewee-async.readthedocs.io/en/latest/ https://peewee-async.readthedocs.io/en/latest/ Looks like Gino is a new project trying to bake asyncio ORM on top of sqlalchemy core: https://github.com/fantix/gino https://github.com/fantix/gino
- hultner 8y agoWhile interesting for greenfield development and experiments I'd say that it's most often a to big of a leap to change both ORM (with all db-access-code) and microframework at the same time for a well established project at 20KLOC+.
- bpicolo 8y agoFor sure, definitely not a good path for an existing app :) You can use the sqlalchemy-core via async via a few projects (https://github.com/RazerM/sqlalchemy_aio https://github.com/RazerM/sqlalchemy_aio) but for the full ORM there's no option, as far as I know.