# streamlit-keyup
[](https://pypi.org/project/streamlit-keyup/)
[](https://pypistats.org/packages/streamlit-keyup)
[](LICENSE)
[](https://github.com/psf/black)
If you're collecting text input from your users in your streamlit app, `st.text_input` works well -- as long as you're happy with
waiting to get the response when they're finished typing.
But, what if you want to get the input out, and do something with it every time they type a new key (AKA "on keyup")?
[](https://key-up.streamlitapp.com)

## Installation
`pip install streamlit-keyup`
## Usage
```python
import streamlit as st
from st_keyup import st_keyup
value = st_keyup("Enter a value", key="0")
# Notice that value updates after every key press
st.write(value)
# If you want to set a default value, you can pass one
with_default = st_keyup("Enter a value", value="Example", key="1")
# If you want to limit how often the value gets updated, pass `debounce` value, which
# will force the value to only update after that many milliseconds have passed
with_debounce = st_keyup("Enter a value", debounce=500, key="2")
```
Raw data
{
"_id": null,
"home_page": "https://github.com/blackary/streamlit-keyup",
"name": "streamlit-keyup",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "Zachary Blackwood",
"author_email": "zachary@streamlit.io",
"download_url": "https://files.pythonhosted.org/packages/ee/d6/41e37aee91813d76dc3a107c539bf584f7feb51a8e58b781af36db8a910f/streamlit-keyup-0.2.3.tar.gz",
"platform": null,
"description": "# streamlit-keyup\n\n[](https://pypi.org/project/streamlit-keyup/)\n[](https://pypistats.org/packages/streamlit-keyup)\n[](LICENSE)\n[](https://github.com/psf/black)\n\nIf you're collecting text input from your users in your streamlit app, `st.text_input` works well -- as long as you're happy with\nwaiting to get the response when they're finished typing.\n\nBut, what if you want to get the input out, and do something with it every time they type a new key (AKA \"on keyup\")?\n\n[](https://key-up.streamlitapp.com)\n\n\n\n## Installation\n\n`pip install streamlit-keyup`\n\n## Usage\n\n```python\nimport streamlit as st\nfrom st_keyup import st_keyup\n\nvalue = st_keyup(\"Enter a value\", key=\"0\")\n\n# Notice that value updates after every key press\nst.write(value)\n\n# If you want to set a default value, you can pass one\nwith_default = st_keyup(\"Enter a value\", value=\"Example\", key=\"1\")\n\n# If you want to limit how often the value gets updated, pass `debounce` value, which\n# will force the value to only update after that many milliseconds have passed\nwith_debounce = st_keyup(\"Enter a value\", debounce=500, key=\"2\")\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Text input that renders on keyup",
"version": "0.2.3",
"project_urls": {
"Homepage": "https://github.com/blackary/streamlit-keyup"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9a553c82c5ba8eb362b10fd02b4d2e0adc30aefffd04804aef3acc6ac58a2c2c",
"md5": "eb23448fe7dfb1f769fa1302d4a1e320",
"sha256": "e3fe87f69b5f800d29b5fe850a064532c2af0a8b1ef34047b9d33ff6c43feaf2"
},
"downloads": -1,
"filename": "streamlit_keyup-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eb23448fe7dfb1f769fa1302d4a1e320",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7423,
"upload_time": "2024-02-14T22:37:57",
"upload_time_iso_8601": "2024-02-14T22:37:57.585416Z",
"url": "https://files.pythonhosted.org/packages/9a/55/3c82c5ba8eb362b10fd02b4d2e0adc30aefffd04804aef3acc6ac58a2c2c/streamlit_keyup-0.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "eed641e37aee91813d76dc3a107c539bf584f7feb51a8e58b781af36db8a910f",
"md5": "db5b4de9c896bf4bfdd4574a813e2a97",
"sha256": "7b7c4fa222dd82d1a479a05683833b2959c62b2dc243ffe0a769f4b79ac5b62c"
},
"downloads": -1,
"filename": "streamlit-keyup-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "db5b4de9c896bf4bfdd4574a813e2a97",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 7309,
"upload_time": "2024-02-14T22:37:58",
"upload_time_iso_8601": "2024-02-14T22:37:58.931106Z",
"url": "https://files.pythonhosted.org/packages/ee/d6/41e37aee91813d76dc3a107c539bf584f7feb51a8e58b781af36db8a910f/streamlit-keyup-0.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-14 22:37:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "blackary",
"github_project": "streamlit-keyup",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "streamlit-keyup"
}