A quick note that I need to demo some simple educational material that shows how we can use postgres-wasm
to drop a postgres-wasm PostgreSQL terminal into an IFrame and run some activities:

We can also access a wasm powered db with proxied sockets, which means:
- we can connect to the DB from something like pandas if we are running in an environment that supports socket connections (which pyodide/JupyterLite doesn’t);
- we only need to run a simple proxy webservice alongside the http server that delivers the WASM bundle, rather than a full PostgreSQL server. Persistence is handled via browser storage, which means if the database is large, that may be the main hurdle…
If we were just doing SQL data wrangling, it would possibly make more sense to use something like DuckDB. In passing, I note an experimental package that supports DuckDB inside JupyterLite — iqmo-org/jupylite_duckdb
— to complement the “full fat” duckdb
Python package:
However, for playing with things like roles and permissions, or more of the basic DB management functions, having a serverless PostgreSQL database is really handy. One thing it can’t (currently?) do, though, is support multiple concurrent connections, which means no playing with transactions? Although – maybe the proxied version can?! One to try…