Skip to content
Discussion options

You must be logged in to vote

psycopg2 is now available for iOS and Android: https://pypi.flet.dev/psycopg2

Just add it to your dependencies and flet build pulls the right iOS/Android wheels automatically:

# pyproject.toml
dependencies = [
    "flet",
    "psycopg2",
]

Note: It's a client — it connects to a remote PostgreSQL server over the network; there's no embedded database on the phone. TLS and SCRAM-SHA-256 auth work out of the box (libpq + OpenSSL are bundled into the wheel).

Example with a real connect() + query round-trip against PostgreSQL 17:

import psycopg2

conn = psycopg2.connect(
    host="your-db-host", port=5432, dbname="mydb", user="me", password="secret"
)
with conn.cursor() as cur:
    cur.execute("…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@baseplate-admin
Comment options

Comment options

You must be logged in to vote
4 replies
@FeodorFitsner
Comment options

@DavMelchi
Comment options

@FeodorFitsner
Comment options

@DavMelchi
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ndonkoHenri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants