Closed cosmosanalytics closed 1 month ago
It's able to do JavaScript if you ask it to. For pyscript to work we would need to bootstrap the interpreter like we do with tailwind. Possible but not something I'm planning on.
I'm curious, why do you want to run pyscript instead of JavaScript?
Because pyscript completely replaces the backend. see the demos at https://pyscript.net/examples/.
JavaScript can only do frontend with node js (or python) at the backend.
If I can use pyscript in OpenUI, I would just need one static web page, everything will be run in the browser.
I can use gemini ai to write pyscript in html, so LLM is capable of writing pyscript in html as well as javascript.
I am a python data scientist, using streamlit to present my analytics, being able to write pyscript in html will save me time to setup the backend.
See pyscript example to do chatgpt at the frontend https://pyscript.com/@adec3dd4-c366-46d3-9d45-84d3b0996a43/07a0de9f-afd1-4975-a65d-17dfb3bf7b4e/latest
here is a screenshot of gemini ai generating pyscript in html
The problem is you really don't want to put your api key into the frontend... also, there's nothing specific about Python in this project. It could all be JavaScript. I just preferred Python for the backend.
I added an option to convert an HTML component into a Streamlit app which could be useful.
Pyscript brings python into frontend, I am wondering if OpenUI can code pyscript in UI? If yes, can you give me an example?