Reset Bokeh session

I have a few bokeh apps being served up with flask. I would like to add a button widget in my bokeh app to reset the session and/or reset to the starting variables after the user has interacted with the widgets. How do I do that?

There’s nothing built in to do this in general, because Bokeh applications are arbitrary Python code and there is simply no way to anticipate what “reset” means in every context. You can add a Button to your layout, and an on_change callback that does whatever reset operations you want it to do (case in point: without knowing anything at all about your app or situation, there is nothing more specific I can say about what the callback should do).

I am not very familiar with how these server sessions work. My question was naive thinking there may be way to reset the session. I understand if that is not possible. That callback function will work for now. Thanks for the suggestion.

There’s not currently any way to reset a session. Another option might be to force a page reload, which will create a new fresh session.