Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: