blackary / st_pages

An experimental version of Streamlit Multi-Page Apps
MIT License
467 stars 77 forks source link

Ignore page change cache error, and fix styling for 1.36 #100

Closed blackary closed 4 months ago

blackary commented 4 months ago

Fixes #99

Note that the error fix is just a band-aid, and might undo some previous work to correctly cache pages.

I am intending to release a new version of st-pages that is a tiny wrapper around the new st.navigation functionality in streamlit 1.36.0

[NOTE]

The test suite is failing, and needs some re-working, but since I'm intending to deprecate a lot of the code in the repo, I'm contenting myself with a manual deploy and manual check at https://accmcdwztzfkymkszxhnrq.streamlit.app/

andrew-weisman commented 3 months ago

Hi @blackary, thanks for such a great package!

Regarding your stated plans, my one request if you wouldn't mind would be that you make sure that multiprocessing can run successfully on any of the pages. I know multiprocessing requires an if __name__ == '__main__' block. st_pages currently supports this. The new Streamlit functionality may support it by way of pages as functions but I just wanted to make sure everything was compatible.

Thanks so much @blackary!

andrew-weisman commented 3 months ago

@blackary FYI, here is a complete example that seems to work with multiprocessing appropriately, using the functions method in the new multipage FYI.