Session expires on page reload

Like on any website, can we have the same Session State on Page Reload or Duplicate Tab?


I explored the different options including Cookie and Device Fingerprint. I’ve decided to go with implementing a Cookie. But, I’m struggling to find a Python Implementation either in a GitHub Project or on a Stack Overflow code snippet or any other resource like a Python Package.

As I’ve minimal Web Development knowledge, I request starting point for Cookie Implementation with Python to persist the Streamlit Session on Page Refresh or across duplicate Tabs in the browser.