{"id":21515033,"url":"https://github.com/nathanchen198/streamlit-cookies-controller","last_synced_at":"2025-04-09T20:11:56.991Z","repository":{"id":226636847,"uuid":"769008375","full_name":"NathanChen198/streamlit-cookies-controller","owner":"NathanChen198","description":"Control client browser cookie for the site.","archived":false,"fork":false,"pushed_at":"2024-05-02T04:45:48.000Z","size":205,"stargazers_count":36,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T22:07:06.058Z","etag":null,"topics":["cookie","python","streamlit-component"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NathanChen198.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-08T06:39:41.000Z","updated_at":"2025-02-27T23:38:13.000Z","dependencies_parsed_at":"2024-11-23T23:53:57.924Z","dependency_job_id":"8b5e1b30-969e-4592-b4b4-fcc0eadd15a6","html_url":"https://github.com/NathanChen198/streamlit-cookies-controller","commit_stats":null,"previous_names":["nathanchen198/streamlit-cookies-controller"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanChen198%2Fstreamlit-cookies-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanChen198%2Fstreamlit-cookies-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanChen198%2Fstreamlit-cookies-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanChen198%2Fstreamlit-cookies-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NathanChen198","download_url":"https://codeload.github.com/NathanChen198/streamlit-cookies-controller/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247647426,"owners_count":20972866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookie","python","streamlit-component"],"created_at":"2024-11-23T23:53:55.521Z","updated_at":"2025-04-09T20:11:56.962Z","avatar_url":"https://github.com/NathanChen198.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to Streamlit Cookie Controller 🍪\n\n[![PyPI][pypi_badge]][pypi_link]\n[![Download][pypi_download_badge]][pypi_link]\n[![GitHub][github_badge]][github_link]\n[![GitHub license][license_badge]][license_link]\n[![GitHub issues][issue_badge]][issue_link]\n[![GitHub pull requests][pull_badge]][pull_link]\n\nControl client browser cookie for the site.\n\n## What is Streamlit Cookie Controller?\n`streamlit-cookies-controller` let you\n\n- get cookie(s)\n- set cookie\n- remove cookie\n\nfrom/to the client browser.\nIt use [universal-cookie](https://www.npmjs.com/package/universal-cookie) package to access the cookies.\n\n\n## Installation\nOpen a terminal and run:\n``` terminal\npip install streamlit-cookies-controller\n```\n\n\n## Quickstart\nCreate a new file example.py\n``` python\nimport streamlit as st\nfrom streamlit_cookies_controller import CookieController\n\nst.set_page_config('Cookie QuickStart', '🍪', layout='wide')\n\ncontroller = CookieController()\n\n# Set a cookie\ncontroller.set('cookie_name', 'testing')\nst.write(st.session_state)\n\n# Get all cookies\ncookies = controller.getAll()\nst.write(cookies)\n\n# Get a cookie\ncookie = controller.get('cookie_name')\nst.write(cookie)\n\n# Remove a cookie\ncontroller.remove('cookie_name')\nst.write(st.session_state)\n```\nRun the streamlit app\n``` terminal\nstreamlit run example.py\n```\n\n\n## Change Log\n### Version 0.0.1\n- Initial release\n### Version 0.0.2\n- return None when there is no cookie with the given name instead of throw error\n### Version 0.0.3\nRemove `Test1` in frontend due to it is flikkering on streamlit v1.32.0\n\n\n[pypi_badge]: https://img.shields.io/pypi/v/streamlit-cookies-controller.svg\n[pypi_link]: https://pypi.org/project/streamlit-cookies-controller\n[pypi_download_badge]: https://static.pepy.tech/badge/streamlit-cookies-controller\n[github_badge]: https://badgen.net/badge/icon/GitHub?icon=github\u0026color=black\u0026label\n[github_link]: https://github.com/NathanChen198/streamlit-cookies-controller\n[license_badge]: https://img.shields.io/badge/Licence-MIT-gr.svg\n[license_link]: https://github.com/NathanChen198/streamlit-cookies-controller/blob/main/LICENSE\n[issue_badge]: https://img.shields.io/github/issues/NathanChen198/streamlit-cookies-controller\n[issue_link]: https://github.com/NathanChen198/streamlit-cookies-controller/issues\n[pull_badge]: https://img.shields.io/github/issues-pr/NathanChen198/streamlit-cookies-controller\n[pull_link]: https://github.com/NathanChen198/streamlit-cookies-controller/pulls\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanchen198%2Fstreamlit-cookies-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathanchen198%2Fstreamlit-cookies-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanchen198%2Fstreamlit-cookies-controller/lists"}