When using cx_Oracle (8.3.0), it is simple to connect to an Oracle DB with just this line of code:
con = cx_Oracle.connect(user = myname, password = mypw, dsn = "myDBprod")
When I swap out for oracledb module (1.0.2), I get an error:
con = oracledb.connect(user = myname, password = mypw, dsn = "myDBprod")
DatabaseError: DPY-4026: cannot connect to database. File tnsnames.ora not found in C:\Oracle\InstantAdmin
While researching this, I found this post: With python-oracledb what does 'DPY-4027: no configuration directory to search for tnsnames.ora' mean But I have no clue why all these extra steps are necessary.