Access and save cookies from Streamlit for Streamlit
Project description
ACE Cookie Manager
Access and change browser cookies from Streamlit scripts:
import os
import streamlit as st
from ace_cm import ECM
# This should be on top of your script
cookies = ECM(
prefix="ace/ace-cm/",
password=os.environ.get("COOKIES_PASSWORD", "My secret password"),
)
if not cookies.ready():
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
Required Variables
CLIENT_ID=*** CLIENT_SECRET=*** AZURE_TENANT_ID=*** AUTHORITY=*** REDIRECT_URI=***
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ace_cm-0.0.8.tar.gz
(679.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ace_cm-0.0.8-py3-none-any.whl
(691.0 kB
view details)
File details
Details for the file ace_cm-0.0.8.tar.gz.
File metadata
- Download URL: ace_cm-0.0.8.tar.gz
- Upload date:
- Size: 679.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8260d61b660963642a16dd7ea4a14be36c6fd63a9d38851e216e4d134efd920f
|
|
| MD5 |
7e26d6bf4b07ebca5feba5ec124a9bab
|
|
| BLAKE2b-256 |
88bd0d85b91925b14c50bb62078dc8cc7d3df358415cb765d58d357e8c443cf1
|
File details
Details for the file ace_cm-0.0.8-py3-none-any.whl.
File metadata
- Download URL: ace_cm-0.0.8-py3-none-any.whl
- Upload date:
- Size: 691.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3442b5b4372a7d6dcd2f62b44c12f734cd02e70a2726862a496adc3facf3a9a
|
|
| MD5 |
53ee44a409d6d7b9c5818fa5da1f8dd3
|
|
| BLAKE2b-256 |
e8627cc283f2a5ceeeec01ed1d86399295b8a978a11ba9c452e385fca2e12bf1
|