Skip to main content

Tags custom component for Streamlit

Project description

Streamlit-tags

A custom component to have Tags in Streamlit. image

Please star the repo and share the usage if you liked it.

Try out a demo here: Streamlit App

Check out docs here:

Install

pip install streamlit-tags

The installation can also be found on PyPi

Usage

This library has one main function to display and use tags:

  • st_tags to display the tags feature

Check the examples/ folder of the project for a more through quick start.

Definition

def st_tags(label: str,
            text: str,
            value: list,
            key=None) -> list
  '''

    :param label: (Str) Label of the Function
    :param text: (Str) Instructions for entry
    :param value: (List) Initial Value
    :param key: (Str)
        An optional string to use as the unique key for the widget.
        Assign a key so the component is not remount every time the script is rerun.
    :return: (List) Tags
    '''

Example Usage

import streamlit as st
from streamlit_tags import st_tags

keywords = st_tags('Enter Keyword:', 'Press enter to add more', ['One', 'Two', 'Three'])

st.write(keywords)

image

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_tags-1.0.6.tar.gz (550.4 kB view details)

Uploaded Source

Built Distribution

streamlit_tags-1.0.6-py3-none-any.whl (557.6 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_tags-1.0.6.tar.gz.

File metadata

  • Download URL: streamlit_tags-1.0.6.tar.gz
  • Upload date:
  • Size: 550.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for streamlit_tags-1.0.6.tar.gz
Algorithm Hash digest
SHA256 6406c588445b696faa65a79fe9a93d16b8e0e37066bca8a7f75e259297791294
MD5 37f3d8665ed8ce50beb827712e5db189
BLAKE2b-256 9a51d91f4b048a6e5ec56049c623a09b9bc7543630daa1f141347f37ecae5f05

See more details on using hashes here.

File details

Details for the file streamlit_tags-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: streamlit_tags-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 557.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for streamlit_tags-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 45b2ab10c6df4a20727388057d3eeaa21553656d3a23e3f8b7c051eb6030ef6a
MD5 babeacec5302572a982725b1aa29f61c
BLAKE2b-256 94fd35aaebac6e8bdf2669854572ba72f9d6b0a85528e6ffb7d2a8cb66b55f8f

See more details on using hashes here.

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