{"id":15063794,"url":"https://github.com/paleneutron/streamlit-ext","last_synced_at":"2025-04-07T12:06:47.075Z","repository":{"id":60404659,"uuid":"530918101","full_name":"PaleNeutron/streamlit-ext","owner":"PaleNeutron","description":"Streamlit widgets sync value with url ,download button which won't cause rerun and some useful functions","archived":false,"fork":false,"pushed_at":"2025-01-06T02:58:31.000Z","size":301,"stargazers_count":38,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T12:06:43.138Z","etag":null,"topics":["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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaleNeutron.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":"2022-08-31T03:11:15.000Z","updated_at":"2025-02-22T07:26:05.000Z","dependencies_parsed_at":"2024-11-26T07:19:05.722Z","dependency_job_id":"b108b518-844a-445d-b841-772cca030095","html_url":"https://github.com/PaleNeutron/streamlit-ext","commit_stats":{"total_commits":24,"total_committers":3,"mean_commits":8.0,"dds":0.5,"last_synced_commit":"a2453d94dd50b443bc69a81496fd56ed287eef9f"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaleNeutron%2Fstreamlit-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaleNeutron%2Fstreamlit-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaleNeutron%2Fstreamlit-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaleNeutron%2Fstreamlit-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaleNeutron","download_url":"https://codeload.github.com/PaleNeutron/streamlit-ext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":["python","streamlit-component"],"created_at":"2024-09-25T00:07:17.440Z","updated_at":"2025-04-07T12:06:47.051Z","avatar_url":"https://github.com/PaleNeutron.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# streamlit-ext\n\n[![PyPI Latest Release](https://img.shields.io/pypi/v/streamlit-ext.svg)](https://pypi.org/project/streamlit-ext/)\n[![streamlit-ext-demo](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](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![example gif](https://raw.githubusercontent.com/PaleNeutron/streamlit-ext/master/docs/examples.gif)\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaleneutron%2Fstreamlit-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaleneutron%2Fstreamlit-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaleneutron%2Fstreamlit-ext/lists"}