Re:Show HN: 1M rows/s from Postgres to Python
by welder on Thursday August 04, 2016 @04:10PM
(#12228105)
How can I use it with SQLAlchemy instead of psycopg2?
[ Parent
| on HN ]
Re:Show HN: 1M rows/s from Postgres to Python
by RedCrowbar on Thursday August 04, 2016 @04:18PM
(#12228150)
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.
Re:Show HN: 1M rows/s from Postgres to Python
by infinite8s on Thursday August 04, 2016 @04:33PM
(#12228245)
It 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.
Re:Show HN: 1M rows/s from Postgres to Python
by RedCrowbar on Thursday August 04, 2016 @04:38PM
(#12228291)
There appears to be an adapter for Core already: https://github.com/CanopyTax/asyncpgsa