Conversation
|
I'm going to take a look when have time! Looks interesting. Right now web support is a part of Flet app template which is not ideal. |
|
Just a thought - it would be great to use serious_python_web for both client-side runtime (Pyodide) and server-side (connecting to server Python via websockets), like see this page is adoptable for both scenarios: https://github.com/flet-dev/flet/blob/main/client/web/index.html I see you are dynamically injecting JS references, which I like, I'm just wondering if we can adopt the approach for server-side run too. |
cc6d296 to
e19c9ca
Compare
|
@FeodorFitsner Hello, I just wanted to make you aware that I pushed some significant code cleanups and rebased my branch on your latest changes. Extra note: cp -r python_app/ assets/
rm -rf assets/python_app/{__pypackages__,venv,.venv} # Delete unnecessary directories to reduce app sizeI am happy to submit a pull request for that, once this PR is merged. Thanks for maintaining this project! |
Also supports loading multiple requirements files (all found in asset manifest) now
b5810ce to
b28f784
Compare
Hello, first of all: Thanks for the amazing project, it allows me to use a lot of scientific python packages, that I would have to re-write in Dart otherwise :)
I hope that I did not overlook something, but it seems like there is no implementation for running the python app on the web platform yet. This PR solves that situation.
About my approach:
SeriousPython.runon the browser does the following:pyodide.jslibrary from https://cdn.jsdelivr.net/pyodide/v0.27.2/full/pyodide.js to the html fileI used this synchronous command approach, because for me, it does not seem to be possible to use Flask inside of a browser environment.
I also know that my approach can definitely be improved, but I unfortunately do not have the time currently to do so. I still wanted to create the PR to get feedback on the general approach and to enable community efforts :)
Possible improvements:
.zipfile instead of the unpacked archive by usingunpack_archivefrom python: https://pyodide.org/en/stable/usage/loading-custom-python-code.htmlI am grateful for receiving any feedback!