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.2.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

streamlit_keyup-0.2.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-keyup-0.2.2.tar.gz.

File metadata

  • Download URL: streamlit-keyup-0.2.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for streamlit-keyup-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0dbe9548ed1763c7cd151feeec465136d7f9c9566d1df6e820db9c3967f95cc0
MD5 6aac34c52716084d64936709263e2fa6
BLAKE2b-256 3e2553d6c0e5bec56a574335172b06fd54a806437c6530f2311429419a4726fd

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for streamlit_keyup-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 490ccb7e8aeddfc7320ea5aded1eb9e17d59a4538280a9ea92681317c942ff42
MD5 ccafa09e93e0a28c98fbaf44b99d22ef
BLAKE2b-256 f1be41d93ede4be050abf76bfe4eeaf14c370930ef799b249aefde8479ae5ff9

See more details on using hashes here.

Provenance

Supported by

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