psycopg2 is the concrete Python adapter behind a PostgreSQL session-storage implementation. It accepts a connection string, opens cursors, executes SQL, and converts database rows into Python objects exposed through a SessionStorage interface. section 4.4.2
A production-oriented storage adapter uses psycopg2 to:
- Retrieve or create sessions, including concurrent creation handled with PostgreSQL ON CONFLICT. section 4.4.2
