A port of Streamlit to Wasm, powered by Pyodide.

Try it out

Visit the playground demo.

Use it on your web page

Here is a sample HTML page.

<!DOCTYPE html>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Stlite App</title>
  <script src="" ></script>
      mainScriptData: `
import streamlit as st

name = st.text_input("Name")
st.write("Hello, ", name or "world")

In this sample,

  • stlite library is imported with the first script tag, then the global stlite object becomes available.
  • stlite.mount() mounts Streamlit frontend on the <body /> element and runs the Python script passed through the mainScriptData option.

Warning stlite is at the very beginning of its development and the API can drastically change without any notice in the future. Moreover, the hosted JS runtime is not versioned now, so future API changes may cause problems with backward compatibility.


Building the packages

In the root directory,

make init

After building, you can run the playground app by running the command below. Access http://localhost:5001/

make serve


View Github