### Using CookieStorage Streamlit Component Python Source: https://github.com/kosfera/streamlit-browser-storage/blob/master/README.md Demonstrates how to initialize the CookieStorage component and perform basic operations like setting, getting, listing, checking existence, checking expiration, and deleting values in browser cookies from a Streamlit app. Requires the 'streamlit-browser-storage' library. ```python from streamlit_browser_storage import CookieStorage s = CookieStorage(key="some_component_key") s.set("some_key", "test") print(s.get("some_key")) print(s.get_all()) print(s.expires_in("some_key")) print(s.exists("some_key")) print(s.delete("some_key")) ``` -------------------------------- ### Using SessionStorage Streamlit Component Python Source: https://github.com/kosfera/streamlit-browser-storage/blob/master/README.md Illustrates how to initialize the SessionStorage component and perform standard operations like setting, getting, retrieving all keys/values, checking existence, checking expiration, and deleting entries in browser session storage within a Streamlit app. Requires the 'streamlit-browser-storage' package. ```python from streamlit_browser_storage import SessionStorage s = SessionStorage(key="some_component_key") s.set("some_key", "test") print(s.get("some_key")) print(s.get_all()) print(s.expires_in("some_key")) print(s.exists("some_key")) print(s.delete("some_key")) ``` -------------------------------- ### Using LocalStorage Streamlit Component Python Source: https://github.com/kosfera/streamlit-browser-storage/blob/master/README.md Shows how to initialize the LocalStorage component and execute common operations such as setting, retrieving, listing all entries, checking existence, checking expiration, and deleting items in browser local storage from a Streamlit application. Depends on the 'streamlit-browser-storage' library. ```python from streamlit_browser_storage import LocalStorage s = LocalStorage(key="some_component_key") s.set("some_key", "test") print(s.get("some_key")) print(s.get_all()) print(s.expires_in("some_key")) print(s.exists("some_key")) print(s.delete("some_key")) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.