This patch adds support for asyncpg and psycopg3 drivers, by introducing the crate+asyncpg:// and crate+psycopg:// dialect identifiers.
It also adds the crate+urllib3:// dialect identifier, for explicitly addressing the urllib3-based transport, in case there might be other HTTP-based transport adapters in the future, using libraries like aiohttp, httpx, or niquests. [^1]
Notes
The asynchronous variant of psycopg is also supported and will be automatically selected when using create_async_engine() instead of create_engine(), so it doesn't have a dedicated dialect identifier.
About
This patch adds support for asyncpg and psycopg3 drivers, by introducing the
crate+asyncpg://
andcrate+psycopg://
dialect identifiers.It also adds the
crate+urllib3://
dialect identifier, for explicitly addressing the urllib3-based transport, in case there might be other HTTP-based transport adapters in the future, using libraries like aiohttp, httpx, or niquests. [^1]Notes
The asynchronous variant of
psycopg
is also supported and will be automatically selected when usingcreate_async_engine()
instead ofcreate_engine()
, so it doesn't have a dedicated dialect identifier.All of this will only work with SQLAlchemy 2.x.
Installation
References
Backlog
psycopg
, see below.[^1]: Picked up from another discussion at https://github.com/panodata/grafana-client/issues/134.