docs
docs copied to clipboard
Request: tutorial for Socket.IO via `python-socketio` integration
Summary
I am trying to use Socket.IO via python-socketio
to stream logs from my back end to my Streamlit front end.
There are a few Streamlit discussions on working with Socket.IO, but none are "complete":
- https://discuss.streamlit.io/t/using-session-state-within-socketio-client-events/45774
- https://discuss.streamlit.io/t/callback-hook-on-a-state-change/29529
- https://discuss.streamlit.io/t/is-there-a-way-to-create-a-streamlit-app-thats-the-same-for-everyone-more-in-description/40180
The request is to make a comprehensive demo of Streamlit working with python-socketio
. It would be cool if the demo involved my somewhat simple use case, which is streaming logs from the back end to the front end.
Why?
Socket.IO (basically abstraction for WebSockets) is a way of enabling real-time bidirectional communication between back end and front end. I think it's a common tool.
How?
Perhaps an Advanced features article
Additional Context
No response
To help Streamlit prioritize this feature, react with a 👍 (thumbs up emoji) to the initial post.
Your vote helps us identify which enhancements matter most to our users.
@jamesbraza Thanks for this enhancement request.
@sfc-gh-dmatthews we probably want to move this request to our docs repo, or?
Transferred to docs. Thanks for the suggestion!
Is there a tutorial on this after all? I was looking for the same thing just now.
Inspired by st_route.py, I made the following to enable Socket.IO (server) in streamlit.
Thank you @sefgit , I will try it!