Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whitphx/stlite
Serverless Streamlit 🎈🚀
https://github.com/whitphx/stlite
hacktoberfest pyodide python streamlit wasm web-assembly webassembly
Last synced: about 1 month ago
JSON representation
Serverless Streamlit 🎈🚀
- Host: GitHub
- URL: https://github.com/whitphx/stlite
- Owner: whitphx
- License: apache-2.0
- Created: 2022-05-14T06:10:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T06:13:40.000Z (6 months ago)
- Last Synced: 2024-05-21T19:12:55.743Z (6 months ago)
- Topics: hacktoberfest, pyodide, python, streamlit, wasm, web-assembly, webassembly
- Language: Python
- Homepage: https://edit.share.stlite.net
- Size: 396 MB
- Stars: 1,029
- Watchers: 10
- Forks: 51
- Open Issues: 78
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Stlite: In-browser Streamlit
**Serverless [Streamlit](https://streamlit.io/) Running Entirely in Your Browser**
[![Test, Build, and Publish](https://github.com/whitphx/stlite/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/whitphx/stlite/actions/workflows/main.yml)
[![Build and Deploy GitHub Pages](https://github.com/whitphx/stlite/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/whitphx/stlite/actions/workflows/gh-pages.yml)[![npm (scoped)](https://img.shields.io/npm/v/@stlite/mountable?label=%40stlite%2Fmountable)](https://www.npmjs.com/package/@stlite/mountable)
[![npm (@stlite/desktop)](https://img.shields.io/npm/v/@stlite/desktop?label=%40stlite%2Fdesktop)](https://www.npmjs.com/package/@stlite/desktop)Streamlit is a Python web app framework for the fast development of data apps. This project is to make it run completely on web browsers with the power of [Pyodide](https://pyodide.org/), WebAssembly (Wasm)-ported Python.
## Try it out online (_Stlite Sharing_)
Visit [Stlite Sharing](https://edit.share.stlite.net/).
[](https://edit.share.stlite.net/)
## Create a desktop app (`@stlite/desktop`)
See [`@stlite/desktop`](./packages/desktop/README.md).
## Use _Stlite_ on your web page (`@stlite/mountable`)
You can use _Stlite_ on your web page loading the script and CSS files via `` and `<link>` tags as below.
Here is a sample HTML file.```html
<!doctype html>
<html>
<head>
<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>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@stlite/[email protected]/build/stlite.css"
/>
</head>
<body>
<div id="root"></div>
<script src="https://cdn.jsdelivr.net/npm/@stlite/[email protected]/build/stlite.js">
stlite.mount(
`
import streamlit as stname = st.text_input('Your name')
st.write("Hello,", name or "world")
`,
document.getElementById("root"),
);