oracledb
Python interface to Oracle Database
Decision gist · record as of 2026-08-14
Yes, if you need to connect Python to Oracle Database. The package is actively maintained by Oracle, production-stable, widely used, has no known vulnerabilities, and supports current Python versions (3.9–3.14). Install friction is moderate due to compiled wheels but manageable. The only caveat is that the dual license (UPL-1.0 OR Apache-2.0) is marked unclear in the fact sheet—verify the license terms match your project's requirements before committing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Thin mode requires Oracle Database 12.1 or later; thick mode (with optional Oracle Client libraries) requires Oracle Database 11.2 or later.
- Medium install friction due to compiled wheels across multiple platforms and Python versions (3.9–3.14).
License · maintenance · safety
UPL-1.0 OR Apache-2.0 (unclear) — License treatment is unclear: the package declares dual licensing under UPL-1.0 OR Apache-2.0, but the fact sheet does not clarify which applies or under what conditions. Review the LICENSE and THIRD_PARTY_LICENSES files in the repository before relying on this package in proprietary or restricted-license contexts.
last release 2026-07-14 (31 days) · last repo commit 2026-08-04 · 446 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 27,127,849 downloads/mo, #867 on PyPI
Alternatives
Verify before relying
import oracledb
with oracledb.connect(user="scott", password="pw", dsn="localhost/orclpdb") as connection:
with connection.cursor() as cursor:
for row in cursor.execute("select sysdate from dual"):
print(row)- Whether the dual UPL-1.0 OR Apache-2.0 license is truly unclear or if one is the primary license in practice.
- Performance characteristics and typical throughput for common workloads compared to alternatives.
- Whether all advertised features (pipelining, concurrent coding, NoSQL document APIs, message queueing) are available in thin mode or require thick mode.
What it is and what it does
oracledb is Oracle's official Python driver for connecting to Oracle Database. It replaces the now-obsolete cx_Oracle driver and is built with Cython for performance and safety. The package supports both thin mode (direct connection to the database with no additional libraries) and thick mode (which loads optional Oracle Client libraries for advanced functionality). It conforms to the Python Database API 2.0 specification and is used by many Python frameworks, ORMs, and SQL generators.
The driver supports a wide range of database operations including SQL and PL/SQL execution, data frame integration, fast data ingestion, NoSQL-style document APIs, message queueing, and database notifications. It offers both synchronous and concurrent coding styles, with optional pipelining of database operations. High availability and security features are included. The package requires Python 3.9 or later and has runtime dependencies on cryptography and typing_extensions.
Use it for
- Building Python applications that need direct SQL and PL/SQL execution against Oracle Database without external client libraries (thin mode).
- Integrating Oracle Database with Python ORMs, SQL generators, and web frameworks that expect PEP 249 compliance.
- Performing fast bulk data ingestion or working with data frames in conjunction with Oracle Database.
- Implementing high-availability database applications with concurrent or pipelined database operations.
- Accessing advanced Oracle features like NoSQL document APIs and message queueing when Oracle Client libraries are available (thick mode).
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to connect Python to Oracle Database.
The package is actively maintained by Oracle, production-stable, widely used, has no known vulnerabilities, and supports current Python versions (3.9–3.14). Install friction is moderate due to compiled wheels but manageable. The only caveat is that the dual license (UPL-1.0 OR Apache-2.0) is marked unclear in the fact sheet—verify the license terms match your project's requirements before committing.
Install
oracledb on PyPI
Before you install
Medium install friction due to compiled wheels across multiple platforms and Python versions (3.9–3.14). Active maintenance with a recent release 31 days ago and ongoing repository activity. Runtime dependencies on cryptography and typing_extensions are both stable, widely-available packages.
Requires Python 3.9 or later. Thin mode requires Oracle Database 12.1 or later; thick mode (with optional Oracle Client libraries) requires Oracle Database 11.2 or later.
License in practice
License treatment is unclear: the package declares dual licensing under UPL-1.0 OR Apache-2.0, but the fact sheet does not clarify which applies or under what conditions. Review the LICENSE and THIRD_PARTY_LICENSES files in the repository before relying on this package in proprietary or restricted-license contexts.
Quickstart
import oracledb
with oracledb.connect(user="scott", password="pw", dsn="localhost/orclpdb") as connection:
with connection.cursor() as cursor:
for row in cursor.execute("select sysdate from dual"):
print(row)
Verify before relying
- Whether the dual UPL-1.0 OR Apache-2.0 license is truly unclear or if one is the primary license in practice.
- Performance characteristics and typical throughput for common workloads compared to alternatives.
- Whether all advertised features (pipelining, concurrent coding, NoSQL document APIs, message queueing) are available in thin mode or require thick mode.
Package facts
| License | UPL-1.0 OR Apache-2.0 unclear |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 2 packagescryptographytyping_extensions |
| Maintenance | Actively maintained 31 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 27,127,849 / month, #867 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: CythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Database |
Evidence: oracledb-4.0.2-cp310-cp310-macosx_10_9_universal2.whl; oracledb-4.0.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; oracledb-4.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; oracledb-4.0.2-cp310-cp310-musllinux_1_2_aarch64.whl; oracledb-4.0.2-cp310-cp310-musllinux_1_2_x86_64.whl; oracledb-4.0.2-cp310-cp310-win32.whl; oracledb-4.0.2-cp310-cp310-win_amd64.whl; oracledb-4.0.2-cp311-cp311-macosx_10_9_universal2.whl; oracledb-4.0.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; oracledb-4.0.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; oracledb-4.0.2-cp311-cp311-musllinux_1_2_aarch64.whl; oracledb-4.0.2-cp311-cp311-musllinux_1_2_x86_64.whl; oracledb-4.0.2-cp311-cp311-win32.whl; oracledb-4.0.2-cp311-cp311-win_amd64.whl; oracledb-4.0.2-cp311-cp311-win_arm64.whl; oracledb-4.0.2-cp312-cp312-macosx_10_13_universal2.whl; oracledb-4.0.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; oracledb-4.0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; oracledb-4.0.2-cp312-cp312-musllinux_1_2_aarch64.whl; oracledb-4.0.2-cp312-cp312-musllinux_1_2_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “oracle database python driver”
- oracledbA Python driver for connecting to Oracle Database directly,…
- cx-Oraclecx_Oracle provides a Python interface to Oracle Database,…
- sqlalchemy-jdbcapiSQLAlchemy dialect for JDBC and ODBC database connections with…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also cx-Oracle · hdbcli · pyodbc · mssql-python · mysql-connector-python-rf · sqlalchemy-jdbcapi · borneo · ydb-dbapi · pypyodbc · firebird-driver