streamlit-input-box
Streamlit component that allows you to edit text/code in a convenient auto-resizable text area. Intended both for code and natural language input (no syntax highlighting implemented). No text wrap and horizontal scrolling makes code editing easier. It's state resets to empty automatically after submiting. Manages its own history of inputs that can be navigated using Ctrl+up / Ctrl+down. Colors adapt dynamically to the app's theme.
Installation instructions
pip install streamlit-input-box
Usage instructions
Pretty straighforward.
text=input_box(
min_lines=1,
max_lines=5,
just_once=False,
callback=None,
args=(),
kwargs={},
key=None
)
Renders an auto-resizable text area. Enter and Tab keystrokes behave as expected for text edition. Ctrl+Enter or click the 'send' button to submit. Returns the inputted text.
Arguments:
- min/max_lines: minimal and maximal limits for auto-resizing of the input box.
- just_once: determines if the component will return the text only once after submiting (and then None), or on every rerun of the app.
- callback: optional callback passed to the component that will be called after submitting.
- args: optional tuple of arguments passed to the callback
- kwargs: optional dict of named arguments passed to the callback
- key: unique state identifier for your component
Example
import streamlit as st
from streamlit_input_box import input_box
state=st.session_state
if 'texts' not in state:
state.texts=[]
text=input_box(min_lines=3,max_lines=10,just_once=True)
if text:
state.texts.append(text)
for text in state.texts:
st.text(text)
Metadata
Release files for streamlit-input-box 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamlit_input_box-0.0.3.tar.gz | 996.4 kB | Without provenance | Details for streamlit_input_box-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamlit_input_box-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for streamlit_input_box-0.0.3-py3-none-any.whl |
Total release size: 2.0 MB
Release files / streamlit_input_box-0.0.3.tar.gz
| Download URL | streamlit_input_box-0.0.3.tar.gz |
|---|---|
| Size | 996.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5cc61e231939bb651ed26ed70e634721febc30ddd8cc4d566bc36eaaa52f44f7
|
|
BLAKE2b-256 checksum How to use checksums |
99257ea89335587ea11158e946e68ab442c77152aeff5d79bb74ff5375d297cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / streamlit_input_box-0.0.3-py3-none-any.whl
| Download URL | streamlit_input_box-0.0.3-py3-none-any.whl |
|---|---|
| Size | 998.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f2a66d5d9dcaf4dbc5a594a739e9a35984689e9d897fd9809e3670ff7ce43f3
|
|
BLAKE2b-256 checksum How to use checksums |
d865f2d05b9014f2ce6f0682f3b4bd46d4897ddfe9f8a74b7f53af664b3abbf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for streamlit-input-box 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.