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:
I agree that, although it simplifies building multi-pages apps compared to a full manual set up with radio buttons or the like and a switching logic (I actually refactored my code from the latter to the new pages structure when updating Streamlit to the latest version), it lacks some flexibility that would make it more attractive:
Be able to insert components above or below the menu in the side bar (make the pages menu a component?)
Be able to organize and reorganize pages at will with minimum effort like you suggested, with a dictionary structure for example
Be able to use any image as an icon instead of emojis in file names only (which make those files complicated to refer to as you need to copy/paste emojis, and also emojis do not make the best icons…)
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.