# Streamlit Autosuggest Component
A custom Streamlit component that provides a searchbar with autosuggestions functionality.
## Installation
You can install the streamlit-autosuggest component using pip:
pip install streamlit-autosuggest
## Usage
Here's a simple example of how to use the searchbar component in your Streamlit app:
import streamlit as st
from streamlit_autosuggest import searchbar
st.title("Autosuggest Component Demo")
# Use the searchbar component
result = searchbar(suggestions=['apple', 'banana', 'cherry'], placeholder="Type a fruit name", key="demo_searchbar")
# Display the search result
if result:
st.write("You searched for:", result)
## Features
- Autocomplete suggestions as you type
- Customizable suggestions list
- Customizable placeholder text
- Seamless integration with existing Streamlit applications
## API Reference
### searchbar(suggestions=None, placeholder=None, key=None)
Creates a new instance of the searchbar component.
Parameters:
- suggestions (list of str, optional): A list of suggestions for the searchbar.
- placeholder (str, optional): A placeholder text for the searchbar.
- key (str, optional): An optional key that uniquely identifies this component.
Returns:
- str: The selected or typed value in the searchbar.
## Development
To contribute to this project, please see the GitHub repository.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
Developed by Chris Weeks
Raw data
{
"_id": null,
"home_page": "https://github.com/weeks888/streamlit-autosuggest",
"name": "streamlit-autosuggest",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "streamlit component searchbar autocomplete",
"author": "Chris Weeks",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/50/98/f126040830fe5aaa288f8883ad11b0ef902133a59a03621da2cd46c759f5/streamlit_autosuggest-0.2.1.tar.gz",
"platform": null,
"description": "# Streamlit Autosuggest Component\n\nA custom Streamlit component that provides a searchbar with autosuggestions functionality.\n\n## Installation\n\nYou can install the streamlit-autosuggest component using pip:\n\n pip install streamlit-autosuggest\n\n## Usage\n\nHere's a simple example of how to use the searchbar component in your Streamlit app:\n\n import streamlit as st\n from streamlit_autosuggest import searchbar\n\n st.title(\"Autosuggest Component Demo\")\n\n # Use the searchbar component\n result = searchbar(suggestions=['apple', 'banana', 'cherry'], placeholder=\"Type a fruit name\", key=\"demo_searchbar\")\n\n # Display the search result\n if result:\n st.write(\"You searched for:\", result)\n\n## Features\n\n- Autocomplete suggestions as you type\n- Customizable suggestions list\n- Customizable placeholder text\n- Seamless integration with existing Streamlit applications\n\n## API Reference\n\n### searchbar(suggestions=None, placeholder=None, key=None)\n\nCreates a new instance of the searchbar component.\n\nParameters:\n- suggestions (list of str, optional): A list of suggestions for the searchbar.\n- placeholder (str, optional): A placeholder text for the searchbar.\n- key (str, optional): An optional key that uniquely identifies this component.\n\nReturns:\n- str: The selected or typed value in the searchbar.\n\n## Development\n\nTo contribute to this project, please see the GitHub repository.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\nDeveloped by Chris Weeks\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Streamlit component for a search bar with autosuggestions",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/weeks888/streamlit-autosuggest"
},
"split_keywords": [
"streamlit",
"component",
"searchbar",
"autocomplete"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c424977bf0f0daa6ca2f928f27204e0708f269147af8cca92f1addc9d046a703",
"md5": "67dcfad700f93090c95e994ae993dec2",
"sha256": "337262cbc622e5a299046fbaf7cfd56b35dbdf986531817a6c5bcdddc3bb5d43"
},
"downloads": -1,
"filename": "streamlit_autosuggest-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "67dcfad700f93090c95e994ae993dec2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 448611,
"upload_time": "2024-06-25T01:51:38",
"upload_time_iso_8601": "2024-06-25T01:51:38.348165Z",
"url": "https://files.pythonhosted.org/packages/c4/24/977bf0f0daa6ca2f928f27204e0708f269147af8cca92f1addc9d046a703/streamlit_autosuggest-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5098f126040830fe5aaa288f8883ad11b0ef902133a59a03621da2cd46c759f5",
"md5": "460c3bbf94c62d4340d0f7b818849e1a",
"sha256": "7ad25c8465807f8358632a4a6f522f2c52afde0f24ae431ace9cf889aa72e62f"
},
"downloads": -1,
"filename": "streamlit_autosuggest-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "460c3bbf94c62d4340d0f7b818849e1a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 445144,
"upload_time": "2024-06-25T01:51:39",
"upload_time_iso_8601": "2024-06-25T01:51:39.768038Z",
"url": "https://files.pythonhosted.org/packages/50/98/f126040830fe5aaa288f8883ad11b0ef902133a59a03621da2cd46c759f5/streamlit_autosuggest-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-25 01:51:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "weeks888",
"github_project": "streamlit-autosuggest",
"github_not_found": true,
"lcname": "streamlit-autosuggest"
}