Watching custom folders

Say I have a folder structure like this

- __init.py__
- ...
- __init.py__
- ...
- ...

I want to run apps from my app folder which uses custom_py_package1 and custom_py_package2. Now that all works fine but I’d like my apps to detect changes in my custom packages without restarting the app. How do I achieve this?

1 Like

Hi @mr-bjerre, thanks for your question. By default Streamlit only watches modules within the directory of the main script file. In your case, that would be app.

Nevertheless, Streamlit also watches modules in the PYTHONPATH. So setting the PYTHONPATH to include the modules you want to track should help you.

See this PR: