In this guide you will create a fully interactive Streamlit app that runs entirely in the browser — no Python installation, no server, and no build step. By the end you will have a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/whitphx/stlite/llms.txt
Use this file to discover all available pages before exploring further.
.html file you can open locally or host on any static file server.
Create an HTML file
Create a new file called
app.html and add the standard HTML boilerplate. Load the Stlite JavaScript module and its companion stylesheet from the jsDelivr CDN using <script> and <link> tags:The CDN URLs above are pinned to version
0.85.1. Stlite recommends using a pinned version rather than the unversioned latest URL, because the API may change between releases without backward compatibility.Write your Streamlit app
Add a The content of the
<streamlit-app> tag inside <body> and write your Python code directly inside it. Stlite automatically detects the tag and boots the Streamlit runtime:<streamlit-app> tag is treated as a Python script — exactly what you would put in a streamlit_app.py file. The full Streamlit API is available.Open in browser
Save the file and open it directly in any modern web browser — no web server required:
- macOS / Linux: double-click
app.htmlin Finder / your file manager, or runopen app.htmlin the terminal. - Windows: double-click
app.htmlin Explorer. - Any platform: drag the file into an open browser window.
Install packages (optional)
If your app needs third-party Python packages, add an The
<app-requirements> tag inside <streamlit-app>. Stlite installs the listed packages at startup via micropip before running your script:<app-file> tag lets you name the file (here streamlit_app.py) and mark it as the entrypoint. The <app-requirements> tag lists one package per line — the same format as a requirements.txt file.Full working example
Here is the complete HTML file from the steps above, combining all the pieces:app.html and open it in your browser. That’s it — a fully interactive Streamlit app with no server.
Next steps
@stlite/browser overview
Learn all the features of the
@stlite/browser package: multipage apps, file mounting, IndexedDB persistence, and the SharedWorker mode.mount() API reference
Use the lower-level
mount() JavaScript function for fine-grained control: pass files, archives, config, and custom Pyodide distributions programmatically.@stlite/react overview
Integrate Stlite into an existing React application using
createKernel() and the <StliteAppWithToast> component.Try Stlite Sharing
Experiment with Stlite in the browser-based online editor — no file needed.