streamlit-notify
raw JSON → 0.3.1 verified Mon Apr 27 auth: no python
A Streamlit component that provides toast notifications that persist across reruns. Current version 0.3.1. Release cadence is irregular.
pip install streamlit-notify Common errors
error ModuleNotFoundError: No module named 'streamlit_notify' ↓
cause The package is not installed or installed in the wrong environment.
fix
Run 'pip install streamlit-notify' in the same Python environment where you run your Streamlit app.
error AttributeError: module 'streamlit_notify' has no attribute 'notify' ↓
cause Import path is incorrect or the version is very old (pre-0.2.0).
fix
Use 'from streamlit_notify import notify'. If that fails, upgrade with 'pip install --upgrade streamlit-notify' and check the correct function name in the docs.
Warnings
gotcha notify() must be called inside a Streamlit app. It will not work in a plain Python script. ↓
fix Ensure you have a Streamlit app running (e.g., import streamlit as st before calling notify).
gotcha The notification may not appear if called before the first streamlit rerun. Use st.rerun() or place notify after a user interaction. ↓
fix Call notify() after a button click or other user action, or add st.rerun() after notify if needed.
Imports
- notify
from streamlit_notify import notify
Quickstart
import streamlit as st
from streamlit_notify import notify
notify("Hello, World!")