Home

I made st-paywall so data scientists and LLM developers can create small businesses around their Streamlit apps. Every week I see dozens of new incredible apps built in Streamlit that are adored by users, but eventually shut down or moved off of Streamlit as authentication and payment integration are too hard. This is my attempt at a dead-simple API around each, abstracting the both away into a single function (add_auth). Enjoy!

Overview

This package gives you one basic function (add_auth) that adds subscription functionality to your Streamlit apps. add_auth will add both a Google login button if they are not logged in, and a Stripe (or Buy Me A Coffee) subscription button to your sidebar if they are not subscribed. If they are subscribed, st.session_state.user_subscribed will be true, and if they are logged in, st.session_state.email will have their email. If the required parameter is True, the app will stop with st.stop() if the user is not logged in and subscribed. Otherwise, you the developer will have control over exactly how you want to paywall the apps!

I hope you use this to create tons of value, and capture some of it with the magic of Streamlit.

This package expects that you have a .streamlit/secrets.toml file which you will have to create. Inside it, you will need to add your Stripe (or Buy Me A Coffee) and Google API information that runs the authentication and subscription parts of the package.

Use the top navigation bar to access the other pages within the documentation.