Skip to content
Dear friends, long time no see! It has been three months since I last updated an article, and I miss you all! The break was not because I was being lazy, but because I welcomed a new baby to my family at the end of November last year. The time I originally spent exploring technology has been taken up by the baby, which is both a joy and a happiness
Now the baby is almost 3 months old, and the startle reflex has improved a lot. He can sleep alone in the crib for about 2 hours. With my partner and mother gradually becoming more skilled at taking care of the baby, I can occasionally find some time to explore technology again, so I’m back! However, I will try to keep my shares brief, because just a moment ago, the baby woke up again
Today, I am bringing you a solution for logging in with Streamlit. In my previous articles, Streamlit Framework Learning 1: Login & Logout + Switching Between Different Pages, Streamlit Framework Learning 4: Using streamlit_authenticator to Call MySQL for Login Interface, and Streamlit Framework Learning 8: Abandoning Third-party Libraries for a Simple Login Interface, I provided different solutions, but they required third-party libraries and were not very smooth in operation. With the updates to Streamlit components, especially the updates to MultiPage and st.navigation, it is now possible to achieve practical results for login and menu groups without third-party libraries. I explored a Streamlit multi-page framework with login functionality for your reference!
The result is as follows:
-
User registration and login functionality (the backend logic for registration and login was generously shared by the owner of the public account “Digital Audit”, and I integrated and designed the frontend page);
-
Grouping of multiple pages, allowing Streamlit users to directly write the content they want;
-
Logout functionality from any page of the system.
https://pan.baidu.com/s/1uvLwdGuTdN_3o-lzeGuNQw?pwd=m4a7 Extraction code: m4a7
Finally, creating is not easy, your attention and support are the greatest motivation for me to persist. Please feel free to share and like to support me. I will continue to share my work in the field of Streamlit applications, hoping to inspire you!