
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
An image select component for Streamlit.
This custom component works just like st.selectbox
but with images. It's a great option
if you want to let the user select an example image, e.g. for a computer vision app!
pip install streamlit-dash
from streamlit_dash import image_select
img = image_select("Label", ["image1.png", "image2.png", "image3.png"])
st.write(img)
Warning You only need to run these steps if you want to change this component or contribute to its development!
First, clone the repository:
git clone https://github.com/jrieke/streamlit-dash.git
cd streamlit-dash
Install the Python dependencies:
poetry install --dev
And install the frontend dependencies:
cd streamlit_dash/frontend
npm install
To make changes, first go to streamlit_dash/__init__.py
and make sure the
variable _RELEASE
is set to False
. This will make the component use the local
version of the frontend code, and not the built project.
Then, start one terminal and run:
cd streamlit_dash/frontend
npm start
This starts the frontend code on port 3001.
Open another terminal and run:
cp demo/streamlit_app.py .
poetry shell
streamlit run streamlit_app.py
This copies the demo app to the root dir (so you have something to work with and see
your changes!) and then starts it. Now you can make changes to the Python or Javascript
code in streamlit_dash
and the demo app should update automatically!
If nothing updates, make sure the variable _RELEASE
in streamlit_dash/__init__.py
is set to False
.
Switch the variable _RELEASE
in streamlit_dash/__init__.py
to True
.
Increment the version number in pyproject.toml
. Make sure the copy of the demo app in
the root dir is deleted or merged back into the demo app in demo/streamlit_app.py
.
Build the frontend code with:
cd streamlit_dash/frontend
npm run build
After this has finished, build and upload the package to PyPI:
cd ../..
poetry build
poetry publish
st.experimental_memo
, which is deprecated.return_value
parameter to be able to get the index of the selected image.index
parameter to set the initially selected image.use_container_width
parameter to customize the width of the component.key
and use_container_width
parameters keyword-only.FAQs
A Streamlit component to select multiple images
We found that streamlit-select demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.