# cx-oracle **Repository Path**: mirrors/cx-oracle ## Basic Information - **Project Name**: cx-oracle - **Description**: cx_Oracle 是一个能够访问 Oracle 数据库的 Python 扩展模块 - **Primary Language**: C/C++ - **License**: Not specified - **Default Branch**: main - **Homepage**: https://www.oschina.net/p/cx_oracle - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 0 - **Created**: 2021-05-28 - **Last Updated**: 2025-06-03 ## Categories & Tags **Categories**: database-dev **Tags**: None ## 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 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](https://github.com/oracle/python-oracledb).