Skip to main content

Text input that renders on keyup

Project description

streamlit-keyup

PyPI version PyPI downloads GitHub Code style: 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")?

Open in Streamlit

filtering

Installation

pip install streamlit-keyup

Usage

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")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_keyup-0.3.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

streamlit_keyup-0.3.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_keyup-0.3.0.tar.gz.

File metadata

  • Download URL: streamlit_keyup-0.3.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for streamlit_keyup-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8595a14892423243669e5d50e982853ffb7eb201b65952a48676133ab9bbc937
MD5 68c2f16aaa03855189e1653098b2e54e
BLAKE2b-256 8825d153babd6d8dff72ee2e56976862ec7fdd7856ec7da2cb6ffd4b3b12f336

See more details on using hashes here.

File details

Details for the file streamlit_keyup-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_keyup-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec7221617b1c832526db52859196c417578d6b4285942fbd10a0b2ff313899b3
MD5 99dd0efb82a8fa8d1f1cbb813b8fcb7c
BLAKE2b-256 14edfacce225c0d360b9bfa053c827029312e1b255e84d79320bda3539417b50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page