BlueCloud is a BlueSquare Sponsor at Snowflake Data Cloud Summit 2024
DATA CLOUD SUMMIT 2024

Streamlit, The Magic of Data Storytelling

Oğuzhan Furkan Aslan

Oğuzhan Furkan Aslan

Data & Analytics Specialist

Streamlit: Simplifying Web Application Development

In today's data-driven world, even those without a technical background recognize the value of data. Organizations are eager to meet their customers' needs through various AI-based use-cases. However, building such applications can be daunting and time-consuming. Enter Streamlit – a powerful Python library that simplifies the creation and sharing of interactive, data-driven web applications.

What is Streamlit?

Streamlit is a Python library designed for building interactive, data-driven web applications. Its main advantage lies in its simplicity, allowing users to create web applications without the need for extensive web development skills.

Key Features of Streamlit:

  1. Simplicity: Streamlit facilitates the rapid development of complex web applications with minimal effort.
  2. Deployment: Applications built with Streamlit can be deployed with ease via the Streamlit Community Cloud and can be shared publicly.
  3. Automation: Streamlit automatically generates the necessary HTML, CSS, and JS components to display the application in a web browser.
  4. Cost: Streamlit is free to use, making it accessible to developers of all levels.
Learning Streamlit:

To start learning Streamlit, beginners can explore the official documentation and tutorials provided by Streamlit. Additionally, the "30 Days of Streamlit" challenge app offers a structured way to learn and build Streamlit applications.

30 Days of Streamlit offers a structured way to learn and build Streamlit applications

Streamlit Community and Resources:

Users can gain further insights and inspiration from the Streamlit community by accessing tips, tutorials, and use cases. The Streamlit gallery showcases a variety of applications built by users, providing valuable examples and ideas.

Streamlit offers a range of features to enhance web applications, for instance:

  • Check boxes
  • Radio buttons
  • Camera input widget

Examples of these implementations are below:

Checkbox:

   import streamlit as st

   checkbox = st.checkbox("Check Box")
   if checkbox:
     st.write("You checked the box")
   else:
     st.write("Box is unchecked!")

Streamlit Check Box
Radio button widget:

   import streamlit as st

   vehicle = st.radio( 'Select your vehicle', ['Car', 'Motorbike', 'Atv'])

   if vehicle == 'Car':
     st.success('Car')
   elif vehicle == 'Motorbike'
     st.success('Motorbike' )
   else:
     st.success('Atv' )

Streamlit ShapeRadio button widget
Camera Widget

A camera widget on your web app allows users to take photos from their webcam.

   photo = st.camera_input("Take a picture")
   if photo:
     st.success('Photo is taken')

Streamlit ShapeRadio button widget
Streamlit in Snowflake (SiS)
Streamlit ShapeRadio button widget

Snowflake's acquisition of Streamlit in early 2022 led to the global launch of Streamlit in Snowflake (SiS). SiS enables users to write Streamlit code directly within Snowflake, leveraging Python. Applications can be built, accessed, and shared securely within Snowflake, offering seamless integration with data and easy collaboration among users. These applications can also be published to the Snowflake Marketplace, further expanding their reach and utility.

In conclusion, Streamlit revolutionizes web application development by offering simplicity, flexibility, and powerful features. Its integration with Snowflake enhances data accessibility and collaboration, further empowering organizations to leverage their data effectively

Resources:

Streamlit

Streamlit Docs

Streamlit API cheat sheet - Streamlit Docs

30 Days of Streamlit

About Streamlit in Snowflake | Snowflake Documentation

Streamlit in Snowflake: Build Data and AI Apps on the Data Cloud with Python