Skip to main content

A Streamlit custom component for selecting and reordering multiple string values.

Project description

streamlit-sortable-multiselect

A Streamlit custom component for selecting multiple string values and changing the selected order.

Install

python -m pip install streamlit-sortable-multiselect

For local development:

python -m pip install -e ".[dev]"

For frontend development:

cd streamlit_sortable_multiselect/frontend
npm install
npm run dev

Usage

import streamlit as st
from streamlit_sortable_multiselect import sortable_multiselect

selected = sortable_multiselect(
    "Favorite frameworks",
    options=["Streamlit", "FastAPI", "Django", "Flask"],
    default=["Streamlit"],
)

st.write(selected)

Build the frontend before packaging or using release mode:

cd streamlit_sortable_multiselect/frontend
npm run build

Run the example app:

streamlit run examples/basic.py

Release

Build and check the distribution files:

cd streamlit_sortable_multiselect/frontend
npm install
npm run build
cd ../..
python -m pip install -e ".[dev]"
python -m build
python -m twine check dist/*

Upload to PyPI with an API token:

python -m twine upload dist/*

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_sortable_multiselect-0.1.1.tar.gz (112.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_sortable_multiselect-0.1.1-py3-none-any.whl (111.5 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_sortable_multiselect-0.1.1.tar.gz.

File metadata

File hashes

Hashes for streamlit_sortable_multiselect-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5f505d64c286eaefb0c48c749efc3d1b9c068a6c1e1cd96e3f3659fa25995d61
MD5 c73b08724abd3920ecd259b00bc9e42c
BLAKE2b-256 619067c1bcb397d6468dc5e80a459feed831d8abb28cadf5a76e6add625c5d55

See more details on using hashes here.

File details

Details for the file streamlit_sortable_multiselect-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_sortable_multiselect-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f111dafb50773a9234e415d752daa18b601dd4d19cab1198d7a1dbde33f2fdae
MD5 65502d2140a753708b0859e73fe4ed06
BLAKE2b-256 5078a5b9bf2a8a572c702888c52edc9e0cc63f90313344447505ab317447e5b4

See more details on using hashes here.

Supported by

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