Closed Jaymon closed 7 months ago
These were the PostgreSQL libraries I looked at:
I chose Psycopg since the newest version now has asyncio it's the library prom already uses. These were some of the implementation links I had open
General Asyncio stuff:
search:
This is the SQLite library I decided to go with:
It was the only one I looked at that had been updated in the last year.
other links I had open:
search:
So here is the blueprint for conversion:
Query
(sync) and AQuery
(async), all the methods will have the same name, so the sync interface will extend the async interface and override the async methods to make them syncronous and use asyncio.run
.query
(sync) and .aquery
(async).save()
and .asave()
(async), .insert()/.ainsert()
, and .update()/.aupdate()
methods.This should handle the entire conversion over to async and allow prom to work transparently in both synchronous and asynchronous environments.
See this endpoints issue for how I want to approach the implementation
For Postgres, I could use asyncpg or aiopg (psycopg). I haven't looked into SQLite yet.