Currently, if we want to create a multipages app, we have to put pages into pages
folder and give them name like 1_pageapple.py
, and pageapple
will show as label on web page.
This will make three problem:
- It is hard to arrange pages. if I already have 10 pages and I want to insert a new page in index 2, I have to rename 8 files.
- The web project structure is too rigid, we can not put some util modules in pages directory or put different pages in any where we like.
- filename is not clean. Actually, label on web page is not the style of my filenames, I do not like emoji in my filenames.
I think streamlit at least should provide a manually model, just like:
st.config(auto_pages=False)
st.add_pages(
{
"🌲label1_name%test": "page1_file_path.py",
"📚label2_name": "folder/page1_file_path.py",
}
)