Skip to main content

A package for converting streamlit apps to stlite apps to remove the need for hosting

Project description

stlitepack

stlitepack is a Python utility that helps you turn your existing Streamlit apps into stlite apps — lightweight, browser-only Streamlit apps that run entirely in the client without a server.

With stlitepack, you can:

  • 📦 Pack your Streamlit app into a stlite-ready format
  • 🗂️ Include additional resources like config.toml
  • 🚀 Generate GitHub Actions workflows to (almost) auto-deploy your app to GitHub Pages

📦 Installation

pip install stlitepack

🚀 Usage

from stlitepack import pack

# Pack your Streamlit app (e.g., "app.py") into a stlite bundle
pack("app.py")

This will create an index.html file with all of the required stlite additions, which you can then serve as a static file using a hosting platform such as github pages.

Documentation

Check out the quickstart guide at sammirosser.com/stlitepack/stlitepack_docs/stlitepack_quickstart.

You can also find the full reference for each function at sammirosser.com/stlitepack/reference/.

🔮 Roadmap

  • ✅ v0.1: Single-page app packing
  • ✅ v0.2: Helper functions for GitHub Pages auto-deploy (via GitHub Actions workflow generation)
  • ✅ v0.3: Multi-page app support (for pages/ subfolder method) and simple additional file inclusion
  • v0.4: Better support for resource bundling (images, CSVs, assets, config files etc.) of local or web-based files
  • v0.5: Better multi-page app support (for st.navigation() method)
  • v0.6: Auto-handling of stlite-specific required changes (e.g. asyncio vs sleep)
  • v0.7: Add support for generating the required package.json for desktop app bundling
  • v0.8: Add helpers for generating files for additional deployment options e.g. Docker, Caddy, Nginx, Apache
  • v0.9: TOML or YAML file support as optional alternative to the packing function
  • v1.0: Full toolkit for packaging, deploying, and managing stlite apps

🤝 Contributing

Contributions, feature requests, and feedback are welcome!

Open an issue or submit a pull request to help improve stlitepack.

📜 License

Apache 2.0 License. See LICENSE for details.

Acknowledgements

Generative AI Use Disclosure

This package was developed with the assistance of ChatGPT (OpenAI’s GPT-5 model) as a coding and documentation partner. All code and design decisions were reviewed and finalized by a human, and ChatGPT’s output was used as a foundation rather than a final product.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stlitepack-0.3.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stlitepack-0.3.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file stlitepack-0.3.1.tar.gz.

File metadata

  • Download URL: stlitepack-0.3.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for stlitepack-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6110d31e5b7c174acd44875471fe8018bb64fc2193285b93638d33f7f8381fb3
MD5 c203ac5f60f66e4ab529bf73cdd9c326
BLAKE2b-256 bcacf6c90c039da57257dd22225cd5fd1ed658773d4924357a71c4dd702a2b4e

See more details on using hashes here.

File details

Details for the file stlitepack-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: stlitepack-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for stlitepack-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3018c07ec628a6d0c140658786445f6856ca6b071045d3b4d208791fc82ed4b2
MD5 d58c06e2d597d97156aa4fafd243f2d2
BLAKE2b-256 82b26f4e99ed76d6fae97db63b72f4575ce61952be4b58acd2ebdeb77c59e9d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page