SQLAlchemy is a ORM, psycopg2 is a database driver. These are completely different things: SQLAlchemy generates SQL statements and psycopg2 sends SQL statements to the database. SQLAlchemy depends on psycopg2 or other database drivers to communicate with the database!
As a rather complex software layer SQLAlchemy does add some overhead but it also is a huge boost to development speed, at least once you learned the library. SQLAlchemy is an excellent library and will teach you the whole ORM concept, but if you don't want to generate SQL statements to begin with then you don't want SQLAlchemy.
SQLAlchemy 是一個 ORM(物件關係對映),psycopg2 是一個資料庫驅動程式,這兩者是完全不同的東西。
SQLAlchemy 用於生成 SQL 語句
psycopg2 用於將 SQL 語句發送到資料庫
SQLAlchemy 依賴於 psycopg2 或其他資料庫驅動程式來與資料庫進行通訊!