Skip to content

Streamlit

Streamlit is the fastest way to build data apps.

Cheatsheet

Instead of listing its funcitionalities here you can find an exhaustive example as standalone repo: Streamlit Cheastsheet

Install

pip install streamlit

streamlit hello

Import

import streamlit as st

st.title("Hello World")

Run

streamlit run pythonscript.py

Caching

In order to cache parts of the website, functions which are not needed to be reexecuted each time can be caches with the help of a python decorator.

@st.cache(persist=True)
def someTimeconsumingFunction():
  sleep(100)