Hi @Filip_Cornell, welcome to the Streamlit community!
streamlit-bokeh-events by @ash2shukla might do something like you are talking about. On the README example, it shows interacting with a scatterplot and returning that information back to Python.

  
      

      GitHub
  

  
    

GitHub - ash2shukla/streamlit-bokeh-events: A streamlit component for...

  A streamlit component for bi-directional communication with bokeh plots. - GitHub - ash2shukla/streamlit-bokeh-events: A streamlit component for bi-directional communication with bokeh plots.


  

  
    
    
  

  


Best,
Randy