Skip to content

Comment on Show HN: HTTP/2 Python-Asyncio Web Microframeworkparent

Comments

The sqlalchemy orm and asyncio are incompatible. There are packages like aiopg that allow for sqlalchemy to be used as a functional sql layer.

If you want to use the orm parts of sqlalchemy, the idea is to use thread executors and handle detaching of objects if you return them to event-loop code.

Well, then how should we do database access ? Because without that part sorted out the rest of the framework is unusable.

Incidentally, my personal opinion is that is the reason why we don't have massive adoption of asyncio despite lots of frameworks (like apistar).

Nodejs for example has every database driver as asynchronous. It is probably worth the effort to make a asyncio compatible dB layer.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.