I understand that psycopg2 is more of a DB driver, and SQLAlchemy is an ORM.
As the latest SQLAlchemy already supports postgreSQL dialect and connection pools, what are the benefits of using psycopg2 (postgresql+psycopg2) or its connection pool over SQLAlchemy’s ?
Refer to the sqlalchemy docs, specifically the diagram here.
In that diagram, SQLAlchemy’s support for PostgreSQL lies in the core segment, notably in the dialect box. psycopg2 is the DBAPI box below it. SQLAlchemy does not duplicate what psycopg2 does, but it does know how to talk to psycopg2 and it knows what native features of PostgreSQL it can instruct psycopg2 to use.