Skip to content

Python driver for Oracle Database conforming to the Python DB API 2.0 specification. This is the successor to cx_Oracle, which is now obsolete.

License

Notifications You must be signed in to change notification settings

oracle/python-oracledb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

54c321e · Apr 7, 2025
Mar 25, 2025
Apr 7, 2025
Apr 4, 2025
Apr 4, 2025
Apr 2, 2025
Mar 17, 2025
Feb 18, 2025
May 20, 2022
Apr 3, 2025
May 25, 2022
Feb 14, 2023
Feb 13, 2025
Feb 13, 2025
Jan 8, 2024
Apr 4, 2025
Oct 10, 2023
Sep 5, 2023
Feb 24, 2025
Mar 25, 2025
Mar 25, 2025
Apr 4, 2025
Mar 25, 2025

Repository files navigation

python-oracledb

python-oracledb is a Python programming language extension module allowing Python programs to connect to Oracle Database. Python-oracledb is the new name for Oracle's popular cx_Oracle driver.

The module conforms to the Python Database API 2.0 specification with a considerable number of additions and a couple of minor exclusions, see the feature list.

Synchronous and concurrent coding styles are supported.

Installation

Run python -m pip install oracledb

See python-oracledb Installation.

Dependencies and Interoperability

  • Python versions 3.9 through 3.13.

    Pre-built packages are available on PyPI and other repositories.

    Source code is also available.

    Previous versions of python-oracledb supported older Python versions.

  • Oracle Client libraries are optional.

    Thin mode: By default python-oracledb runs in a 'Thin' mode which connects directly to Oracle Database.

    Thick mode: Some advanced Oracle Database functionality is currently only available when optional Oracle Client libraries are loaded by python-oracledb. Libraries are available in the free Oracle Instant Client packages. Python-oracledb can use Oracle Client libraries 11.2 through 23ai.

  • Oracle Database

    Thin mode: Oracle Database 12.1 (or later) is required.

    Thick mode: Oracle Database 9.2 (or later) is required, depending on the Oracle Client library version. Oracle Database's standard client-server version interoperability allows connection to both older and newer databases. For example when python-oracledb uses Oracle Client 19c libraries, then it can connect to Oracle Database 11.2 or later.

Documentation

See the python-oracledb Documentation and Release Notes.

Samples

Examples can be found in the /samples directory and the Python and Oracle Database Tutorial.

Help

Questions can be asked in GitHub Discussions.

Problem reports can be raised in GitHub Issues.

Tests

See /tests

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.

Security

Please consult the security guide for our responsible security vulnerability disclosure process.

License

See LICENSE, THIRD_PARTY_LICENSES, and NOTICE.