https://github.com/oracle/python-cx_Oracle
Obsolete Python interface to Oracle Database, now superseded by python-oracledb
https://github.com/oracle/python-cx_Oracle
database-connector db-connection odpi oracle-database oracle-db python python-library python-module
Last synced: 13 days ago
JSON representation
Obsolete Python interface to Oracle Database, now superseded by python-oracledb
- Host: GitHub
- URL: https://github.com/oracle/python-cx_Oracle
- Owner: oracle
- License: other
- Created: 2017-03-07T04:03:36.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2025-03-27T02:24:28.000Z (19 days ago)
- Last Synced: 2025-03-27T17:11:12.477Z (18 days ago)
- Language: C
- Homepage: https://oracle.github.io/python-oracledb/
- Size: 7.32 MB
- Stars: 891
- Watchers: 73
- Forks: 365
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Security: SECURITY.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
- best-of-python - GitHub - 4% open · ⏱️ 31.05.2024): (Database Clients)
README
# Python cx_Oracle
**cx_Oracle was obsoleted by
[python-oracledb](https://oracle.github.io/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 oracledbun = '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](https://github.com/oracle/python-oracledb).