# pip install oracledb # using oracledb you must have oracle client utils installed import oracledb # setup the oracle connection username = 'admin' password = 'password' dsn = 'endpointInRDS/SID' # SID is either database name for non-tenancy or go to Configuration Tab in database instance in RDS for SID: using multi-tenancy # create the connection conn = None try: conn = oracledb.connect(user=username, password=password, dsn=dsn) print("hey it worked!") cursor = conn.cursor() cursor.execute("SELECT * FROM CONTACTS") # use SQL Syntax for row in cursor: print(row) except oracledb.Error as e: print(f"Oracle Error: {e}") finally: if conn: cursor.close() conn.close()