Python callback functions in streamlit


I am working on a dashboard project using bokeh and streamlit. Is there a way to use python callback functions on a widget made through bokeh but ran on a streamlit server. Right now its is giving out an error that streamlit doesn’t support standalone callback functions and only JS callback can be used. Is there a way to go about this using callback python functions running on a streamlit server and not only through JavaScript callbacks?

Thanks in advance!