You can try marimo notebooks, which are stored as pure Python and support SQL cells through duckdb. (I’m one of its authors.)
https://github.com/marimo-team/marimo