Name | ace-cm JSON |
Version |
0.0.4
JSON |
| download |
home_page | None |
Summary | Access and save cookies from Streamlit |
upload_time | 2024-10-25 15:13:35 |
maintainer | None |
docs_url | None |
author | Cem Bakar |
requires_python | <4.0,>=3.11 |
license | Apache-2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# ACE Cookie Manager
Access and change browser cookies from Streamlit scripts:
```python
import os
import streamlit as st
from ace_cm import ECM
# This should be on top of your script
cookies = ECM(
prefix="ace/ace-cm/",
password=os.environ.get("COOKIES_PASSWORD", "My secret password"),
)
if not cookies.ready():
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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "ace-cm",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Cem Bakar",
"author_email": "cem.bakar@sonova.com",
"download_url": "https://files.pythonhosted.org/packages/04/38/515cfa0317b0ead9d97e36ce2df0314f269521b4db889f64c3dcc256b1d2/ace_cm-0.0.4.tar.gz",
"platform": null,
"description": "# ACE Cookie Manager\n\nAccess and change browser cookies from Streamlit scripts:\n\n```python\nimport os\nimport streamlit as st\nfrom ace_cm import ECM\n\n# This should be on top of your script\ncookies = ECM(\n prefix=\"ace/ace-cm/\",\n password=os.environ.get(\"COOKIES_PASSWORD\", \"My secret password\"),\n)\nif not cookies.ready():\n st.stop()\n\nst.write(\"Current cookies:\", cookies)\nvalue = st.text_input(\"New value for a cookie\")\nif st.button(\"Change the cookie\"):\n cookies['a-cookie'] = value # This will get saved on next rerun\n if st.button(\"No really, change it now\"):\n cookies.save() # Force saving the cookies now, without a rerun\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Access and save cookies from Streamlit",
"version": "0.0.4",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2fc1bb29b71d2fd3469663b0bad5c901842496a43a9d0719de34e0027e31bdee",
"md5": "c5dab2def0b29b23201bc3c31c85bb25",
"sha256": "bb50124a962e98adb50e3b231aa12e1264f316ea77203178302da11675fa3451"
},
"downloads": -1,
"filename": "ace_cm-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c5dab2def0b29b23201bc3c31c85bb25",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 689859,
"upload_time": "2024-10-25T15:13:34",
"upload_time_iso_8601": "2024-10-25T15:13:34.406318Z",
"url": "https://files.pythonhosted.org/packages/2f/c1/bb29b71d2fd3469663b0bad5c901842496a43a9d0719de34e0027e31bdee/ace_cm-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0438515cfa0317b0ead9d97e36ce2df0314f269521b4db889f64c3dcc256b1d2",
"md5": "411e9a8e85fe5ed072763033d60f3584",
"sha256": "67f0e7791afb38be285abc78f3162c5aac6e3f83f5be222b67448f19c4db7697"
},
"downloads": -1,
"filename": "ace_cm-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "411e9a8e85fe5ed072763033d60f3584",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 679328,
"upload_time": "2024-10-25T15:13:35",
"upload_time_iso_8601": "2024-10-25T15:13:35.652730Z",
"url": "https://files.pythonhosted.org/packages/04/38/515cfa0317b0ead9d97e36ce2df0314f269521b4db889f64c3dcc256b1d2/ace_cm-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-25 15:13:35",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ace-cm"
}