Tips for Streamlit learnt the hard way

Transform your Streamlit experience with these top tips: from multipage simplicity to efficient caching and sleek layouts. Let’s dive in!

Jose Parreño
6 min readJul 10, 2024

When I started in the Data Science space around 2015, I learnt it through R, and Shiny was the go-to framework to built interactive frameworks. Whilst I know that Shiny does also have a python integration, I remembered that Shiny could become quite difficult to manage and I needed a quick way to build demo or simple dashboards for our Data Science team. This is when I discovered Streamlit. In this post I want to cover some tips for Streamlit I have learnt in my journey with it.

Tips for Streamlit 1: Make your life easy with st.pages()

St.pages() is package developed by blackary, and believe, its simplicity makes it a no-brainer to use. Prior to st.pages(), one had to organise a multipage app by creating a pages folder and naming python files numerically (see streamlit’s example). That broke all my limited knowledge of software engineering… I didn’t want to configure things through hardcoded names!

St.pages() allows the user to do the following:

  1. Create a pages directory (required by streamlit), but with whatever naming you want to give each python file.
  2. Create a reusable function do define the ordering and actual naming of the pages you will see in the…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Jose Parreño

Jose is a Sr. Data Science manager at Skyscanner. He currently leads the marketing, hotels and cars Data Science teams. He loves bidding and ranking algorithms.