2025-03-26 20:19:34 -06:00
2024-07-30 17:09:37 -06:00
2021-11-04 11:30:34 -06:00
2022-05-25 14:37:50 -06:00
2024-07-30 17:09:37 -06:00
2021-11-04 13:20:41 -06:00
2021-11-04 13:20:11 -06:00

Python cx_Oracle

cx_Oracle was obsoleted by python-oracledb in 2022.

Python-oracledb uses the same Python DB API as cx_Oracle, and has many new features.

Install with:

python -m pip install oracledb

Usage is like:

import getpass
import oracledb

un = 'scott'
cs = 'localhost/orclpdb1'
pw = getpass.getpass(f'Enter password for {un}@{cs}: ')

with oracledb.connect(user=un, password=pw, dsn=cs) as connection:
    with connection.cursor() as cursor:
        sql = 'select systimestamp from dual'
        for r in cursor.execute(sql):
            print(r)

The source code for python-oracledb is at github.com/oracle/python-oracledb.

Description
Obsolete Python interface to Oracle Database, now superseded by python-oracledb
Readme 7.6 MiB
Languages
C 56.4%
Python 39.9%
PLSQL 3.7%