Skip to content

recipe: oracledb 4.0.1#83

Merged
ndonkoHenri merged 3 commits into
mainfrom
oracledb
Jun 19, 2026
Merged

recipe: oracledb 4.0.1#83
ndonkoHenri merged 3 commits into
mainfrom
oracledb

Conversation

@ndonkoHenri

Copy link
Copy Markdown

Adds python-oracledb 4.0.1 (official Oracle Database driver) for iOS and Android.

Closes flet-dev/flet#3249. Also supersedes the cx_Oracle request (flet-dev/flet#3381), which is infeasible on mobile (it requires the proprietary Oracle Instant Client); oracledb's default thin mode needs no Oracle client libraries.

Recipe shape

Plain Cython C-extension, no patches, no flet-lib* dependency. python-oracledb compiles four Cython extensions (base_impl, thin_impl, thick_impl, arrow_impl), and bundles all its native code in the sdist — ODPI-C (for thick mode) and nanoarrow (for Arrow dataframes) — so there's no external native library to build or link.

Runtime deps cryptography (already on pypi.flet.dev) and typing_extensions (pure-Python) come from the wheel metadata and resolve at app-build time.

Thin vs thick mode

The default thin mode is a pure-socket implementation of Oracle Net — no Oracle client libraries required, so it works on mobile. thick_impl.so is imported at package load (oracledb/__init__.py) and builds/loads fine without the Instant Client (ODPI-C dlopens it lazily, only on init_oracle_client()), so thick mode is simply unavailable on mobile while thin mode — the supported path — works.

Tested

  • Full matrix builds green (zero patches): Android arm64-v8a/armeabi-v7a/x86/x86_64 and iOS arm64 (device) / arm64 (simulator) / x86_64 (simulator), Python 3.12.
  • On-device against a LIVE database (Android arm64 emulator + iOS simulator): import oracledb loads all four Cython extensions, is_thin_mode() is True, cryptography loads, and a real thin-mode round-trip — Oracle Net handshake + O5LOGON crypto auth + SELECT 'hello-from-flet', SYSDATE FROM dual — succeeds against Oracle Database Free 23ai (server 23.26.2.0.0), returning the expected row on both platforms.

@ndonkoHenri ndonkoHenri merged commit cdd2d20 into main Jun 19, 2026
14 checks passed
@ndonkoHenri ndonkoHenri deleted the oracledb branch June 19, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant