skillfed

cx-Oracle

Python interface to Oracle

cx-oracle v8.3.0 3.8M downloads/30d#2,500 on PyPI888
Permissive license BSD License AGING released

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-oracle

uv

uv add cx-oracle

poetry

poetry add cx-oracle

Installing 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

Development Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: CProgramming Language :: Python :: 3 :: OnlyTopic :: Database

Tags

oracle database python driverpython oracle connectionoracle db api adaptercx_oracle database accesspython oracle client libraryoracle sql execution pythonoracle database interface
oracle-clientdatabase-driverdbapi

More Database packages