Connecting to PostgreSQL using pyodbc Connecting to PostgreSQL using pyodbc postgresql postgresql

Connecting to PostgreSQL using pyodbc


Of course you must install ODBC driver. I don't know Mac, but in Windows there is ODBC Manager where you configure Data Sources. For PostgreSQL driver there is also "Test" button to check if connection can be established.

As fog noticed you can also use other technology to connect to PostgreSQL. If you can use Jython then you can use JDBC driver. There are also native drivers like psycopg, PyGreSQL and pg8000 (pure Python). Can you give them try?