There's multiple ways to create a multipage streamlit app.
I liked the approach by Prakhar Rathi in this article. They also made a nice example with their data storyteller app.
I decided to make this repo to address two things:
Streamlit allows you to reload changes in the app without restarting it. That's super useful when developing apps iteratively. Sadly, with the multipage approach this functionality breaks. With a small change I could get it to work again.
The datastoryteller app is is really nice. But it's also a lot. I wanted to create a minimal example so it's easier to share with other people who want to make a multipage app.
Kapture.2022-02-18.at.12.39.20.mp4
pip install streamlit
streamlit run app/main.py
Edit app/pages/home.py
or app/pages/another.py
and see that reload still works.
For your own usage copy the code in app/
as a template.
Don't forget to add streamlit to your dependencies.