3 ms·
SQLAlchemy ORM is not async, so there is no way currently to use any async dialect for it. However, it is possible to write an SQLAlchemy Core adapter for asyn
by RedCrowbar 10y ago
SQLAlchemy ORM is not async, so there is no way currently to use any async dialect for it. However, it is possible to write an SQLAlchemy Core adapter for asyncpg.
- infinite8s 10y agoIt might even be easier than writing an adapter if you just use SQLAlchemy Core's DSL as the generative mechanism for a SQL statement that is sent to asyncpg.
- RedCrowbar 10y agoThere appears to be an adapter for Core already: https://github.com/CanopyTax/asyncpgsa https://github.com/CanopyTax/asyncpgsa
- nhumrich 10y agoAuthor of asyncpgsa here, I am in the process of writing that, let me know if you have questions.