3 ms·
could you add sqlalchemy integration docs as well ? because that is where I get stuck when thinking about async. How does psycogreen work with you asyncio apis
by sandGorgon 9y ago
could you add sqlalchemy integration docs as well ? because that is where I get stuck when thinking about async. How does psycogreen work with you asyncio apis ?
- dfee 9y agoThe 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.
- sandGorgon 9y agoWell, 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.