Skip to main content

Streamlit cookies controller

Project description

Welcome to Streamlit Cookie Controller 🍪

PyPI Download GitHub GitHub license GitHub issues GitHub pull requests

Control client browser cookie for the site.

What is Streamlit Cookie Controller?

streamlit-cookie-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

from streamlit_cookies_controller import CookieController

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

controller = CookieController()

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

# Get all cookies
cookies = controller.getAll()

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

# Remove a cookie
controller.remove('cookie_name')

Run the streamlit app

streamlit run example.py

Change Log

Version 0.0.1

  • Initial release

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

streamlit-cookies-controller-0.0.2.tar.gz (433.3 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page