whitphx / stlite

In-browser Streamlit 🎈🚀
https://edit.share.stlite.net
Apache License 2.0
1.25k stars 65 forks source link

SharedWorker mode for multiple embeddings in a single page #631

Open whitphx opened 1 year ago

whitphx commented 1 year ago

Currently it's impossible because multiple Streamlit's Runtime instance can't exists in a single Python runtime. https://github.com/streamlit/streamlit/blob/61f61ad2daeab44c7d98564a57724c20f1f8a48f/lib/streamlit/runtime/runtime.py#L174-L175

whitphx commented 1 week ago

Customize the forked Streamlit so that it manages the Runtime instance as ContextVars instead of a singleton instance?