Guidance from Our Subject Matter Experts
Improving Streamlit App with Fragments
Streamlit is a Python library designed for creating data-driven applications quickly and easily that has recently been growing in popularity dramatically. According to Google Trends, more Google searches about Streamlit have been executed now than ever before in Streamlit’s history. Not only is it popular now, but the trend shows that Streamlit is becoming exponentially more used every year. With the immense growth in its popularity, there has never been a better time to start learning Streamlit. Luckily for developers who may have missed out until now, Streamlit’s API is intuitive and mostly well-documented. However, there are some things in Streamlit which can be difficult to understand. One of the most obvious examples is fragments. Fragments are a way for developers to define areas of a Streamlit program which reload independently from the rest of the page. This behavior is very powerful but can also be very confusing. This article will discuss how Streamlit works without fragments, how this behavior changes with the addition of fragments, and how a developer can start using fragments in their Streamlit apps.