You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stlite is great for getting Python to WASM via Streamlit.
There is a lot of power, in particular, running a custom React component in Stlite via Streamlit.
Recently, I tried to use pure React + Pyodide to start replicating what I'd done in Streamlit. I wanted it more like a traditional React frontend with Python backend but in WASM.
Pyodide does not make it easy or intuitive to access a complex Python backend from a React front. Maybe it is just a docs issue?
Pyodide works well with Python snippets but, for snippets, I might as well use JS. If I am trying this hard to use Python, it's because I have a bunch of logic. Once there is a lot of python logic, snippets get awkward.
One issue might be that Pyodide takes a frontend style where devs are used to alternating between JS, HTML, React, CSS, in the same codeblock... Python calls might not seem that different.
For a Python dev trying awkwardly to adopt React we probably want:
An easy way to import our python project directory on the React side
An interface for calling python functions
The ability of our various python methods to find each other easily
If it helps explain the issue, here is a recent blog on the pyodide site that gives a feel for what is (and is not) currently possible.
So, this is not an idea for Stlite. This is an idea for a new project that makes it easier to get a Python backend working in a React-first setup.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Stlite is great for getting Python to WASM via Streamlit.
There is a lot of power, in particular, running a custom React component in Stlite via Streamlit.
Recently, I tried to use pure React + Pyodide to start replicating what I'd done in Streamlit. I wanted it more like a traditional React frontend with Python backend but in WASM.
Pyodide does not make it easy or intuitive to access a complex Python backend from a React front. Maybe it is just a docs issue?
Pyodide works well with Python snippets but, for snippets, I might as well use JS. If I am trying this hard to use Python, it's because I have a bunch of logic. Once there is a lot of python logic, snippets get awkward.
One issue might be that Pyodide takes a frontend style where devs are used to alternating between JS, HTML, React, CSS, in the same codeblock... Python calls might not seem that different.
For a Python dev trying awkwardly to adopt React we probably want:
If it helps explain the issue, here is a recent blog on the pyodide site that gives a feel for what is (and is not) currently possible.
So, this is not an idea for Stlite. This is an idea for a new project that makes it easier to get a Python backend working in a React-first setup.
Beta Was this translation helpful? Give feedback.
All reactions