Giter Site home page Giter Site logo

introduction-to-streamlit-and-streamlit-components's Introduction

Auth0 Guest Authors Logo

This article is published in full on the Auth0 developer blog

Introduction to Streamlit and Streamlit Components

TL;DR: Streamlit is an open-source app framework for Machine Learning and Data Science teams. You can create beautiful data apps in hours. All in pure Python. Streamlit was released in October 2019 and was recently acquired by Snowflake. There's huge excitement about it in the Data Science community. It's not just for Data Science though. With its component extensibility architecture, you can build and integrate most kinds of web frontends into Streamlit apps. This article will show you how to build Streamlit apps and custom Streamlit Components, with the end goal of implementing Auth0 authentication of Streamlit apps using Streamlit Components. My experience with Streamlit can be verified on the official page of Streamlit Creators.

Don't take my word for it that Streamlit is extremely popular and worth taking a serious look at. Here's a chart I found showing the extremely rapid adoption rate of Streamlit compared to other similar tools.

Streamlit Rapid Adoption Rate

Why is that so?

Streamlit focuses on simplicity

"How can we make a machine learning script and convert it into an app as simple as possible, so that it basically feels like a scripting exercise?", Inventor of Streamlit, Adrien Treuille (PhD)

Streamlit is a single Python package that you install through pip, that gives you a set of functions which:

  • Can be interleaved into an existing ML code script
  • Essentially making the ML code parameterizable
  • Does a little bit of layout, and
  • Magically turns your ML code into a beautiful app

Inspiration is drawn from Jupyter, ipywidgets, R-Shiny, Voila, React, etc., but more as a guiding light than a software architecture. There are significant technical differences in the implementation of Streamlit, which is based on a declarative data flow model, not wiring callbacks.

Python frameworks such as scikit-learn, spaCy, Pandas, and various visualization frameworks such as Altair, Plotly and Matplotlib all work seamlessly with Streamlit.

Streamlit supports many uses

  • Every single data analysis team needs to create apps. They're a focal point - like the bonfire of the team. It’s where team members get together and communicate.
  • Apps are a crucial part of the ML (data analysis) workflow, especially in a non-trivial project.
  • This applies not only to internal apps. Machine learning researchers and data scientists need to build apps for external consumption too. Other teams need to consume models in various different ways, and it ought to be much easier to build the required but different application layers to do that.

I'm a big fan of Streamlit and use it extensively for serious work and play. In a previous job I had developed several in-house apps that I needed to share externally with clients and colleagues, so adding security and authentication features was imperative. As you'll see in this article Streamlit's embedded components extensibility architecture and native session state management will help realize this security objective.

Here is the GitHub repository for this article.

Read the full article...

introduction-to-streamlit-and-streamlit-components's People

Contributors

asehmi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.