It might be a solution but not all python packages work with WebAssembly. The next problem might be connection to external data sources. You cant keep secrets in frontend code.
Good point about secrets. Fortunately everything I write is for "internal use only" at my workplace, or if it's a home project, then I share everything. But I can see having to warn a non-techie that you're giving something which could reveal secrets if they pass it on to a third party. Especially since the secret stuff will be invisible to them unless they ask.