1

What is a DB-API (Python) and what is a database module and how do they interact ?

I have a TCC project and I need to understand the difference and the purpose of these terms. I thought DB-API was, for example, a driver like psycopg2 but psycopg2 is a driver and has another purpose. If I'm wrong, correct me.

1 Answer 1

0

DB-API is a specification that SQL database modules written in Python adhere to.

  • psycopg2 is a DB-API compliant module for PostgreSQL,
  • mysqlclient is a DB-API compliant module for MySQL,
  • cx_Oracle is a DB-API compliant module for Oracle,

etc.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.