Jul 19, 2020
Your Oracle connection example can be simplified to:
import cx_Oracle
conn = cx_Oracle.connect(user='hr', password='hr', dsn='localhost/orcl')
See the cx_Oracle documentation on connecting at: https://cx-oracle.readthedocs.io/en/latest/user_guide/connection_handling.html