I wondered if there was a way in Streamlit to run one process in the background while you’re already running another process.
Are you looking for something like this?
The producer / consumer pattern using asyncio works very well. I’m using it in the auth component I built (see the discussion on Auth0 Authentication). Asyncio supports tasks running on other threads too. See the docs: Producer/consumer — Asyncio Documentation 0.0 documentation.