ideonate / streamlit-launchpad

Browse a folder containing multiple streamlit apps and launch them immediately
Apache License 2.0
141 stars 25 forks source link

subdirectory as grouping mechanism #5

Open rsheftel opened 3 years ago

rsheftel commented 3 years ago

First, thanks for a great program, I find it very useful. I am trying to think about a way to have the main web landing page allow for grouping of streamlit files so there can be some logical hierarchy. It seems to me that reaching into the subdirectories in the folder passed to the streamlit-launchpad makes the most sense, but to be honest I am not sure how to modify the code to make that work. Any pointers to start I would be happy to submit a PR.

danlester commented 3 years ago

This makes sense, and wouldn't be too difficult, but would affect a few different components across the codebase.

You would need the MainHandler class to be able to match different subfolders specified in the URL instead of just the root folder.

And DefaultProxyHandler would need to be able to match multiple subfolder levels here/... and there would be subtle knock-on effects throughout the code that proxies to the underlying Streamlit processes etc.

Overall, there also needs to be some consideration for security, e.g. not being able to use '..' in the URL to find files outside the root where the process is running.

I don't think I will be able to make these changes myself, and don't really want to promise to review a PR, mainly because I hope that Streamlit themselves make this project obsolete! It would be much better handled by their product directly. There was an open issue on their repo for this, I think.

If you do want to take a look 'for fun' at this change, then of course please feel free to show me as a PR.