Metadata-Version: 2.1
Name: streamlit-cookies-manager
Version: 0.1.0
Summary: Access and save cookies from Streamlit
License: Apache-2.0
Author: Tomasz Kontusz
Author-email: tomasz.kontusz@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: streamlit (>0.63)
Description-Content-Type: text/markdown

# Streamlit Cookies Manager

Access and change browser cookies from Streamlit scripts:
```python
import streamlit as st
from streamlit_cookies_manager import CookieManager

# This should be on top of your script
cookies = CookieManager()
if not cookies.ready():
    # Wait for the component to load and send us current cookies.
    st.stop()

st.write("Current cookies:", cookies)
value = st.text_input("New value for a cookie")
if st.button("Change the cookie"):
    cookies['a-cookie'] = value  # This will get saved on next rerun
    if st.button("No really, change it now"):
        cookies.save()  # Force saving the cookies now, without a rerun
```

