+1 to all the Auth feedback. There are now several auth models, each with their own quirks. Streamlit should have its own auth module (esp now that navigation and page management is natively supported). After trying out the new navigation in 1.36 with existing streamlit-authenticator in a multi-page app, there seems to be incompatibility issues.
Alternative styling options - it would be cool if the look and feel was optional, similar to how plotly charts have a Streamlit or default plotly theme.
I think this is a great example of how to keep things simple but make them look very different - https://shadcn.streamlit.app/. (especially having conditional tabs!).
Analytics out of the box - there are ways to track usage of the apps, uptime, memory usage, etc. Would be awesome if Streamlit came with a number of metrics that are measured and are available to render. Memory intensive apps really require you to be aware of your memory usage, its not difficult to add but IMO, Streamlit supporting that natively would be great. Same for usage stats, which would really help with cluster sizing expectations.
2 Likes
I use this function to access the cookies and headers in streamlit. It is part of a large session validation class I use to validate if a user can view a streamlit dashboard. Generally I use it for cookies to get a users session information saved in a cookie. I set the session info after a login through a fastapi app which acts as a landing page of sorts and controls authentication and access to specific streamlit dashboards we have running internally. Each streamlit app then checks for cookie info and either allows a user to proceed or presents a redirect option (I would love to see redirects added to streamlit too!) and calls st.stop()
def get_cookie(self):
from streamlit.web.server.websocket_headers import _get_websocket_headers
from http.cookies import SimpleCookie
headers = _get_websocket_headers()
cookie_str = headers.get("Cookie")
cookie = SimpleCookie(cookie_str)
s = cookie['dash-session'].value.split(sep='.')[0]
self.session = s.encode('utf-8', errors='ignore')
2 Likes
Simple multithreading would be nice.
1 Like
Thanks for asking the community @jcarroll
- As @skyrim_giant mentioned async functions are right now quite difficult to manage discussion. In my case I would like to query database with asyncpg.
- I would love to have a integrated filter option for the st.dataframe or the st.data_editor The workaround do its job, but to be honest it is messy, bulky and not really user friendly. An integrated searching function would be nice as well.
- Integration plotly resampler would be awesome. see workaround
1 Like
I think the vertical alignment for st.columns
added in 1.36 are a life saver, but I still miss being able to align components horizontally inside a column. A simple use case would be a big graph with a title above it, currently there’s no official way to center the title above the graph without doing some st.columns([padding,title_size,padding])
shenanigans, which doens’t look nice when resizing the browser.
1 Like
For anyone who stumbles upon this, the v1.37.0 release introduces st.context.headers
, thank you Streamlit Team!
1 Like