streamlit-cookies-controller
Streamlit cookies controller
What it is and what it does
Streamlit Cookie Controller is a lightweight bridge that lets you read, write, and delete browser cookies from within a Streamlit application. It wraps the JavaScript universal-cookie library to expose cookie operations through a Python API, allowing you to store and retrieve client-side state that persists across page reloads within the browser.
The package provides three core operations: set a cookie with a name and value, retrieve a single cookie by name or all cookies at once, and remove cookies. This is useful for Streamlit apps that need to maintain user preferences, authentication tokens, or session identifiers on the client side rather than relying solely on Streamlit's server-side session state.
Use it for:
- Store user preferences (theme, language, layout) that persist across browser sessions in a Streamlit app.
- Maintain authentication tokens or session IDs on the client for multi-tab or multi-window Streamlit deployments.
- Implement remember-me functionality or user recognition without server-side database queries.
- Coordinate state between a Streamlit frontend and external web services that also use cookies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides read, write, and delete operations on browser cookies from a Streamlit application, bridging the gap between server-side Streamlit code and client-side cookie storage.
Yes, if you need client-side cookie management in a Streamlit app and accept dormant maintenance. The package is simple, has no known vulnerabilities, and low install friction. However, be aware that the last update was 2024-04-10 with no recent commits—if you encounter issues with newer Streamlit versions or need active support, you may need to fork or find an alternative.
Install
streamlit-cookies-controller on PyPI
pip
pip install streamlit-cookies-controlleruv
uv add streamlit-cookies-controllerpoetry
poetry add streamlit-cookies-controllerInstalling streamlit-cookies-controller
Before you install
Low friction installation with a single runtime dependency on streamlit. Maintenance is dormant—last release was 2024-04-10 and no commits since 2024-05-02—so expect no active bug fixes or feature updates.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions, typical for open-source Streamlit extensions.
Quickstart
pip install streamlit-cookies-controller
import streamlit as st
from streamlit_cookies_controller import CookieController
controller = CookieController()
controller.set('my_cookie', 'value')
cookie_value = controller.get('my_cookie')
Requires a running Streamlit application context; cookies are stored and retrieved from the client browser, so browser cookie settings and privacy policies apply.
Verify before relying
- Whether the package works reliably with current Streamlit versions beyond v1.32.0 (last tested version mentioned in changelog).
- Whether cookie persistence survives across browser sessions or is limited to the current session.
- Performance characteristics when managing large numbers of cookies or frequent read/write operations.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — streamlit |
| Maintenance | dormant — 856 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 78,244/month — #14,457 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: streamlit_cookies_controller-0.0.4-py3-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
streamlit-javascriptExecutes arbitrary JavaScript code from within…
permissive · top 15,000 on PyPI
streamlit-authenticatorAdds user authentication and access control to…
permissive · top 15,000 on PyPI
extra-streamlit-componentsProvides additional UI components for Streamlit…
permissive · top 15,000 on PyPI
cookiesParses and renders HTTP Cookie and Set-Cookie…
permissive · top 15,000 on PyPI
browser-cookie3Extracts cookies from your browser's local…
copyleft · top 5,000 on PyPI
streamlit-js-evalStreamlit-js-eval lets you run arbitrary…
unclear · top 15,000 on PyPI
django-cookie-consentA Django application that manages cookie…
permissive · top 15,000 on PyPI
streamlit-image-coordinatesA Streamlit component that displays an image…
permissive · top 15,000 on PyPI
pycookiecheatExtracts and decrypts cookies from Chrome,…
permissive · top 15,000 on PyPI
streamlit-autorefreshAdds a frontend timer to Streamlit apps that…
unclear · top 15,000 on PyPI