Online code editor + app sharing for serverless Streamlit = stlite sharing

As a part of stlite project making Streamlit run completely on web browsers,
I am developing an online code editor + app sharing platform for Streamlit apps based on stlite.
You can write and share Streamlit apps with a serverless Python runtime!

Please check it out!


After editing the code, click the “Open App” button to open the app standalone ↓

The source code and data are encoded and embedded into the URL, so you can share the URL and restore the app anywhere (this idea is inspired by ShinyLive).


Bonus :balloon:
You can host the app code on GitHub or Gist and load it via URL as below:

Refs:

14 Likes

Genius!

2 Likes

Amazing. Seriously amazing. Have you considered not stripping off the # part of the url after the app loads? Would make sharing easier, as I wouldn’t have to go back to the place I clicked. I understand hiding it in the case where you have all the code for the app base64 encoded, but it would be nice in the case where you’re using a reasonable-length url like from a github or gist.

2 Likes

Thank you!

@blackary
It makes sense. I created a ticket: Keep the URL hash after loading the app · Issue #284 · whitphx/stlite · GitHub

3 Likes

Great work, @whitphx!

QQ Is there a way to check which libraries have failed to install?

Thanks,
Charly

1 Like

@Charly_Wargnier Thanks,
There is not the detailed error message on the screen for now,
so please see the error message on the dev console (F12 may open it).

I created a ticket (Show the details of the installation error · Issue #285 · whitphx/stlite · GitHub), so please be patient for it to be released.

1 Like

Thanks, @whitphx!

F12 should do the job for now

Best,
Charly

1 Like

Hi Charly
Just wondering if it is possible to read a file using pandas using stlite.
I m getting this error:

URLError: <urlopen error [Errno 26] Operation in progress>

Traceback:

File "/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 555, in _run_script
    exec(code, module.__dict__)File "/home/pyodide/streamlit_app.py", line 140, in <module>
    df = pd.read_csv(File "/lib/python3.10/site-packages/pandas/util/_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)

Please let me know if you have any suggestions.
Thanks

1 Like

Yes, possible.

See the example below.

1 Like

I updated stlite sharing and now it generates a static HTML containing all the source code and data for your self-hosting.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.