cx-Oracle
Python interface to Oracle
What it is and what it does
cx_Oracle is a Python extension module that bridges Python applications to Oracle Database systems. It implements the Python database API 2.0 specification, allowing developers to execute SQL queries, manage transactions, and manipulate data in Oracle databases. The package is a compiled C extension that requires platform-specific wheels and Oracle client libraries to be present on the system.
The package has been in production use since its first release in 2014 and is classified as mature. It supports Oracle versions 11.2, 12c, 18c, 19c, and 21c. However, its maintenance has slowed significantly—the latest release is from 2021-11-04, and the repository shows an aging status. While the repository remains active with recent commits and no known security vulnerabilities, the gap in release activity and lack of explicit support for newer Python versions may be a concern for projects on modern Python stacks.
Use it for:
- Connect Python applications to existing Oracle Database instances for OLTP workloads and reporting queries.
- Migrate legacy Oracle-dependent systems to Python while maintaining database connectivity.
- Build data pipelines that extract, transform, and load data from Oracle into data warehouses or lakes.
- Develop administrative tools and scripts that interact with Oracle schemas and manage database objects.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
cx_Oracle provides a Python interface to Oracle Database, implementing the Python database API 2.0 specification to enable queries, transactions, and data manipulation against Oracle instances.
Yes, if you need to connect to Oracle Database and are on Python 3.6–3.10 with Oracle client libraries available. The package is mature, permissively licensed, and has no known vulnerabilities. However, the aging release cycle (last update 2021-11-04) and lack of explicit support for Python 3.11+ make it less ideal for new projects targeting modern Python versions—verify compatibility with your Python version before committing.
Install
cx-oracle on PyPI
pip
pip install cx-oracleuv
uv add cx-oraclepoetry
poetry add cx-oracleInstalling cx-Oracle
Before you install
Medium install friction due to compiled C extension requiring platform-specific wheels; package is aging (last release November 2021, 1744 days old) but repository remains active with recent commits and no known vulnerabilities.
License in practice
BSD License is permissive and places minimal restrictions on use, modification, or redistribution in commercial or private projects.
Quickstart
pip install cx-Oracle
import cx_Oracle
connection = cx_Oracle.connect('user/password@host/database')
cursor = connection.cursor()
cursor.execute('SELECT * FROM table_name')
for row in cursor:
print(row)
Requires Oracle client libraries (11.2, 12c, 18c, 19c, or 21c) to be installed and configured on the system; cx_Oracle 8.3.0 supports Python 3.6 through 3.10.
Verify before relying
- Whether Oracle client library installation and configuration steps are well-documented for common deployment scenarios.
- Current status of Python 3.11+ support given the package's aging maintenance signal and last release in 2021.
Package facts
| License | BSD License (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 1,744 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,770,686/month — #2,500 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cx_Oracle-8.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl; cx_Oracle-8.3.0-cp310-cp310-win32.whl; cx_Oracle-8.3.0-cp310-cp310-win_amd64.whl; cx_Oracle-8.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl; cx_Oracle-8.3.0-cp36-cp36m-win32.whl; cx_Oracle-8.3.0-cp36-cp36m-win_amd64.whl; cx_Oracle-8.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl; cx_Oracle-8.3.0-cp37-cp37m-win32.whl; cx_Oracle-8.3.0-cp37-cp37m-win_amd64.whl; cx_Oracle-8.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl; cx_Oracle-8.3.0-cp38-cp38-win32.whl; cx_Oracle-8.3.0-cp38-cp38-win_amd64.whl; cx_Oracle-8.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl; cx_Oracle-8.3.0-cp39-cp39-win32.whl; cx_Oracle-8.3.0-cp39-cp39-win_amd64.whl
Keywords: Oracle, database
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
oracledbA Python driver for connecting to Oracle…
unclear · top 1,000 on PyPI
dbt-oracledbt-oracle is a dbt adapter that enables data…
permissive · top 15,000 on PyPI
pg8000pg8000 is a pure-Python PostgreSQL driver that…
permissive · top 1,000 on PyPI
ociPython SDK for Oracle Cloud Infrastructure that…
permissive · top 5,000 on PyPI
sqlalchemy-jdbcapiSQLAlchemy dialect for JDBC and ODBC database…
permissive · top 15,000 on PyPI
borneoPython SDK for connecting to Oracle NoSQL…
unclear · top 15,000 on PyPI
mysql-connectorMySQL driver written in Python that enables…
copyleft · top 5,000 on PyPI
casbin-sqlalchemy-adapterConnects PyCasbin access control policies to…
permissive · top 15,000 on PyPI
psycopg2PostgreSQL database adapter for Python that…
copyleft · top 1,000 on PyPI
mysql-connector-python-rfA pure-Python MySQL driver that implements the…
copyleft · top 15,000 on PyPI