Best (current) practice for spawing a process to run independent of Streamlit?

Hi,

You can use this approach here, which spawns a Flask server, and calls its /foo endpoint from Streamlit. You could replace that endpoint implementation with your long running process (LRP). Via an additional /status endpoint you can occasionally request the status of the LRP from Streamlit. Your LRP could occasionally drop a status message file as it does its work for /status to read or maybe your LRP can be queried directly.

For something more robust run and monitor your LRP, use a job queue system, and call their APIs from Streamlit to get job statuses. Examples (for Python) that come to mind are:

HTH,
Arvindra