Varrazzo: Thinking psycopg3
Varrazzo: Thinking psycopg3
Psycopg is the database adapter used
by most Python programs needing to work with the PostgreSQL database
manager. In this
blog post, psycopg maintainer Daniele Varrazzo looks forward to the
next major version. "There is a chance now to rethink how thick the
C libpq wrapper should be. We can reduce the C implementation to a minimal
wrapper around the libpq (replaceable by a CFFI Python wrapper if compiling
C is not available on the client), using it as a foundation to build a
familiar DBAPI blocking interface. A blocking behaviour is not bad in
itself: it allows to write most of the programs, the ones which don't need
crazy concurrency, in a simple and familiar paradigm; the async layer would
be available under the hood to squeeze the best performance in programs who
have embraced an asynchronous pattern and framework.
"