aiomysql #3280
-
|
. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
aiomysql works on Flet mobile — no special build or recipe needed. It's pure-Python (built on PyMySQL), so I verified it on-device on both an Android arm64 emulator and an iOS simulator: Two things worth knowing: 1. It's a network client. It connects to a remote MySQL/MariaDB server — there's no embedded database on the phone. With 2. On iOS, add a one-line shim. Flet's iOS Python runtime doesn't ship the Unix-only import os
os.environ.setdefault("LOGNAME", os.environ.get("USER") or "fletuser")
import aiomysql # imports fine on iOS nowThis is an upstream aiomysql quirk (tracked in aio-libs/aiomysql#1053). Note the in-flight fix there only broadens the guard to |
Beta Was this translation helpful? Give feedback.
aiomysql works on Flet mobile — no special build or recipe needed. It's pure-Python (built on PyMySQL), so
flet buildbundles it straight from PyPI.I verified it on-device on both an Android arm64 emulator and an iOS simulator:
importworks and a fullCREATE/INSERT/SELECTround-trip against a MariaDB 11.8 server succeeds on both.Two things worth knowing:
1. It's a network client. It connects to a remote MySQL/MariaDB server — there's no embedded database on the phone. With
mysql_native_password/ MariaDB, no extra dependency is needed. For MySQL 8's defaultcaching_sha2_passwordover a non-TLS connection you'll also needcryptography(which Flet already supports) or just connect ove…