Name | streamlit-ext JSON |
Version |
0.1.19
JSON |
| download |
home_page | None |
Summary | Small handy widgets for streamlit, e.g. download button which won't cause rerun, set page width |
upload_time | 2025-07-10 01:39:53 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
streamlit
widgets
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# streamlit-ext
[](https://pypi.org/project/streamlit-ext/)
[](https://paleneutron-streamlit-ext-testse2etest-sync-widget-orfpyh.streamlitapp.com/)
A small handy extension for streamlit, keep your widget values in url, and share it with your friends.
Use widget from `stramlit-ext` just as `streamlit` and pass a unique `key` to it!

```python
import numpy as np
import pandas as pd
import streamlit as st
import streamlit_ext as ste
df = pd.DataFrame(np.random.rand(10, 5))
option = ste.selectbox(
"A form will show up if you select less than 10",
range(100),
key="selectbox",
)
st.write("You selected:", option)
age = ste.slider("How old are you?", 0, 130, 25, key="slider1")
st.write("I'm ", age, "years old")
ste.download_button("Click to download data!", df, "YOUR_DF.xlsx")
ste.download_button("Click to download text!", b"text content", "YOUR_STRING.txt")
```
## installation
```bash
pip install streamlit-ext
```
## Usage
### sync widgets' value with urls
When widgets value changes, the url synced and if you open the url in new tab, every value keeped.
Just import widgets from streamlit_ext, and give a specific `key` argument to it!
```python
import streamlit as st
import streamlit_ext as ste
from datetime import time, datetime, date
option = ste.selectbox(
"How would you like to be contacted?",
range(100),
key="selectbox",
)
st.write("You selected:", option)
d = ste.date_input("When's your birthday", date(2019, 7, 6), key="date_input")
st.write("Your birthday is:", d)
t = ste.time_input("Set an alarm for", time(8, 45), key="time_input")
st.write("Alarm is set for", t)
```
### Download button which won't cause rerun
```python
import streamlit as st
import streamlit_ext as ste
st.title('streamlit-ext')
ste.set_page_width("60em")
ste.download_button("Download", "Hello World".encode(), "hello.txt")
```
### Set page width
```python
import streamlit as st
import streamlit_ext as ste
st.title('streamlit-ext')
ste.set_page_width("60em")
st.write("a quick fox jump..."*100)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "streamlit-ext",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "streamlit, widgets",
"author": null,
"author_email": "John Lyu <paleneutron@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/ed/0c/68bddc2843dcae507be5b9dfc0efe789ea113336f0bc78f44dead0a86245/streamlit_ext-0.1.19.tar.gz",
"platform": null,
"description": "# streamlit-ext\n\n[](https://pypi.org/project/streamlit-ext/)\n[](https://paleneutron-streamlit-ext-testse2etest-sync-widget-orfpyh.streamlitapp.com/)\n\nA small handy extension for streamlit, keep your widget values in url, and share it with your friends.\n\nUse widget from `stramlit-ext` just as `streamlit` and pass a unique `key` to it!\n\n\n\n```python\nimport numpy as np\nimport pandas as pd\n\nimport streamlit as st\nimport streamlit_ext as ste\n\ndf = pd.DataFrame(np.random.rand(10, 5))\n\n\noption = ste.selectbox(\n \"A form will show up if you select less than 10\",\n range(100),\n key=\"selectbox\",\n)\n\nst.write(\"You selected:\", option)\n\nage = ste.slider(\"How old are you?\", 0, 130, 25, key=\"slider1\")\nst.write(\"I'm \", age, \"years old\")\n\nste.download_button(\"Click to download data!\", df, \"YOUR_DF.xlsx\")\nste.download_button(\"Click to download text!\", b\"text content\", \"YOUR_STRING.txt\")\n```\n\n\n\n## installation\n\n```bash\npip install streamlit-ext\n```\n\n## Usage\n\n### sync widgets' value with urls\n\nWhen widgets value changes, the url synced and if you open the url in new tab, every value keeped.\n\nJust import widgets from streamlit_ext, and give a specific `key` argument to it!\n\n```python\nimport streamlit as st\nimport streamlit_ext as ste\n\nfrom datetime import time, datetime, date\n\noption = ste.selectbox(\n \"How would you like to be contacted?\",\n range(100),\n key=\"selectbox\",\n)\n\nst.write(\"You selected:\", option)\n\nd = ste.date_input(\"When's your birthday\", date(2019, 7, 6), key=\"date_input\")\nst.write(\"Your birthday is:\", d)\n\nt = ste.time_input(\"Set an alarm for\", time(8, 45), key=\"time_input\")\nst.write(\"Alarm is set for\", t)\n```\n\n### Download button which won't cause rerun\n\n```python\nimport streamlit as st\nimport streamlit_ext as ste\n\nst.title('streamlit-ext')\n\nste.set_page_width(\"60em\")\n\nste.download_button(\"Download\", \"Hello World\".encode(), \"hello.txt\")\n```\n\n### Set page width\n\n```python\nimport streamlit as st\nimport streamlit_ext as ste\n\nst.title('streamlit-ext')\n\nste.set_page_width(\"60em\")\n\nst.write(\"a quick fox jump...\"*100)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Small handy widgets for streamlit, e.g. download button which won't cause rerun, set page width",
"version": "0.1.19",
"project_urls": {
"Source Code": "https://github.com/PaleNeutron/streamlit-ext"
},
"split_keywords": [
"streamlit",
" widgets"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2c4061feb5351992cbbb71923f1448c73f5ba1c2226fc57519d51002b7f887e2",
"md5": "6370c76e02e869baffbc8574d167a7d8",
"sha256": "2d55cebfa7d5bb35067f7d1b362e94f1bc8a892151efc2eca99252e83af96cf2"
},
"downloads": -1,
"filename": "streamlit_ext-0.1.19-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6370c76e02e869baffbc8574d167a7d8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11777,
"upload_time": "2025-07-10T01:39:52",
"upload_time_iso_8601": "2025-07-10T01:39:52.155307Z",
"url": "https://files.pythonhosted.org/packages/2c/40/61feb5351992cbbb71923f1448c73f5ba1c2226fc57519d51002b7f887e2/streamlit_ext-0.1.19-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ed0c68bddc2843dcae507be5b9dfc0efe789ea113336f0bc78f44dead0a86245",
"md5": "941232f1ae38d489d5fd97bdaa484cc9",
"sha256": "af49b5947cff53060559684e472db8f90fe8139e27aa8a42d032248fccc4e9e6"
},
"downloads": -1,
"filename": "streamlit_ext-0.1.19.tar.gz",
"has_sig": false,
"md5_digest": "941232f1ae38d489d5fd97bdaa484cc9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 283057,
"upload_time": "2025-07-10T01:39:53",
"upload_time_iso_8601": "2025-07-10T01:39:53.318105Z",
"url": "https://files.pythonhosted.org/packages/ed/0c/68bddc2843dcae507be5b9dfc0efe789ea113336f0bc78f44dead0a86245/streamlit_ext-0.1.19.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 01:39:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PaleNeutron",
"github_project": "streamlit-ext",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "streamlit-ext"
}