Skip to main content

Streamlit Cookies Manager

Access and change browser cookies from Streamlit scripts:

import os
import streamlit as st
from streamlit_cookies_manager import EncryptedCookieManager

# This should be on top of your script
cookies = EncryptedCookieManager(
    # This prefix will get added to all your cookie names.
    # This way you can run your app on Streamlit Cloud without cookie name clashes with other apps.
    prefix="ktosiek/streamlit-cookies-manager/",
    # You should really setup a long COOKIES_PASSWORD secret if you're running on Streamlit Cloud.
    password=os.environ.get("COOKIES_PASSWORD", "My secret password"),
)
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

Metadata

Release files for streamlit-cookies-manager 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-cookies-manager 0.2.0
File Size Uploaded Provenance Actions
streamlit-cookies-manager-0.2.0.tar.gz 680.1 kB Without provenance Details for streamlit-cookies-manager-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-cookies-manager 0.2.0
File Interpreter ABI Platform Actions
streamlit_cookies_manager-0.2.0-py3-none-any.whl Python 3 none any Details for streamlit_cookies_manager-0.2.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / streamlit-cookies-manager-0.2.0.tar.gz

Download URL streamlit-cookies-manager-0.2.0.tar.gz
Size 680.1 kB
Tags Source
SHA-256 checksum
How to use checksums
498531778bd4a63267364e8986b3774319d3ba2f4ba65a92357196723966e4d4
BLAKE2b-256 checksum
How to use checksums
a815d016f1b2e1c547fecf7782dac3860d2aad4e22b4c1664d78bb2a873163ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.9.7 Linux/5.13.0-23-generic

Release files / streamlit_cookies_manager-0.2.0-py3-none-any.whl

Download URL streamlit_cookies_manager-0.2.0-py3-none-any.whl
Size 691.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12503dc3367dfc2a780cb9e4a81ad791737806a7b9d1c25a006386e32aabe956
BLAKE2b-256 checksum
How to use checksums
6160d4aefff016f9fe48d10c59b2e52ae823444525f973e7948821c9eefb4217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.9.7 Linux/5.13.0-23-generic

Security for streamlit-cookies-manager 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page