Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

streamlit-cookies-controller

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streamlit-cookies-controller

Streamlit cookies controller

  • 0.0.4
  • PyPI
  • Socket score

Maintainers
1

PyPI Download GitHub GitHub license GitHub issues GitHub pull requests

Control client browser cookie for the site.

streamlit-cookies-controller let you

  • get cookie(s)
  • set cookie
  • remove cookie

from/to the client browser. It use universal-cookie package to access the cookies.

Installation

Open a terminal and run:

pip install streamlit-cookies-controller

Quickstart

Create a new file example.py

import streamlit as st
from streamlit_cookies_controller import CookieController

st.set_page_config('Cookie QuickStart', '🍪', layout='wide')

controller = CookieController()

# Set a cookie
controller.set('cookie_name', 'testing')
st.write(st.session_state)

# Get all cookies
cookies = controller.getAll()
st.write(cookies)

# Get a cookie
cookie = controller.get('cookie_name')
st.write(cookie)

# Remove a cookie
controller.remove('cookie_name')
st.write(st.session_state)

Run the streamlit app

streamlit run example.py

Change Log

Version 0.0.1

  • Initial release

Version 0.0.2

  • return None when there is no cookie with the given name instead of throw error

Version 0.0.3

Remove Test1 in frontend due to it is flikkering on streamlit v1.32.0

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc