Any abbreviation for st.session_state?

st.session_state consists of 16 letters, It doesn’t look very elegant.

Potential Solution 1:
import streamlit.session_state as sst
Potential Solution 2:
use*&^%$#@! any special letter as st.session_state

Any suggestion ?

Hi @dearfad

You could do something like this:

ms = st.session_state
if "mynum" not in ms: ms.mynum = 0

ms.mynum = 4

Cheers

1 Like

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