Build a SaaS with Streamlit

preview_player
ะŸะพะบะฐะทะฐั‚ัŒ ะพะฟะธัะฐะฝะธะต

๐——๐—˜๐—ฆ๐—–๐—ฅ๐—œ๐—ฃ๐—ง๐—œ๐—ข๐—ก
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€
Discover how to turn your Streamlit app into a lucrative SaaS platform! In this comprehensive guide, I demonstrate how to use the st-paywall package to seamlessly integrate Google OAuth for user authentication and Stripe for accepting payments. I'll guide you through every step: from setting up the app, and integrating payment solutions, to deploying it on the Streamlit Community Cloud. Whether you're looking to monetize your existing Streamlit application or starting from scratch, this tutorial is for you. Dive in to see how I unlock the full potential of Streamlit and st-paywall!

๐ŸŒ ๐—Ÿ๐—œ๐—ก๐—ž๐—ฆ:

โญ ๐—ง๐—œ๐— ๐—˜๐—ฆ๐—ง๐—”๐— ๐—ฃ๐—ฆ:
0:00 โ€“ Introduction
0:46 โ€“ Setting Up the Project & Installation
2:02 โ€“ Integrating Google Authentication
4:33 โ€“ Building the Streamlit App
5:50 โ€“ Integrating Stripe for Payments
9:00 โ€“ Deploying on Streamlit Community Cloud
12:12 โ€“ Updating After Deployment
12:38 โ€“ Other Payment Providers
13:03 โ€“ Outro

๐—ง๐—ข๐—ข๐—Ÿ๐—ฆ ๐—”๐—ก๐—— ๐—ฅ๐—˜๐—ฆ๐—ข๐—จ๐—ฅ๐—–๐—˜๐—ฆ
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

๐—–๐—ข๐—ก๐—ก๐—˜๐—–๐—ง ๐—ช๐—œ๐—ง๐—› ๐— ๐—˜
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

โ˜• ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ?
If you want to support this channel, you can buy me a coffee here:
ะ ะตะบะพะผะตะฝะดะฐั†ะธะธ ะฟะพ ั‚ะตะผะต
ะšะพะผะผะตะฝั‚ะฐั€ะธะธ
ะะฒั‚ะพั€

๐Ÿ“Œ *REMINDER:* While the st-paywall package allows for integrating payments into Streamlit apps, it's essential to note that it doesn't currently offer a user interface for subscription management within the app. Any adjustments or cancellations to subscriptions need to be handled directly through the Stripe dashboard. While this doesn't make it a fully-fledged SaaS solution, I believe it's still an easy and good way to monetize your web apps.

CodingIsFun
ะะฒั‚ะพั€

Those nights where you canโ€™t sleep and find amazing new features for your little start up project โ€ฆ love it ๐Ÿ˜‚

andreasw
ะะฒั‚ะพั€

Hey Sven - anytime I have a streamlit question, it always leads to one of your videos. You're the ultimate Streamlit guru. Thank you for all of your help!

guitarmeetsscience
ะะฒั‚ะพั€

love this! probably one of the best tutorials but you could have shared about st-paywall not supporting cookies in the beginning. I watched whole tutorial and implemented the same for my SaaS and now i am getting to know that st-paywall is useless until they push some new updates related to cookies :)

kathanmehtaa
ะะฒั‚ะพั€

Hey @CodingIsFun, thanks so much for all your videos. They are super helpful! I have a question. How to implement this on multi-page Streamlit apps?

HashtagTiluda
ะะฒั‚ะพั€

I might be able to use this, very helpful. Thank you!

florianroeseler
ะะฒั‚ะพั€

Hi. You have a typo at 0:53 ๐Ÿ˜‰. Except that it's a very good video (as usual)

echidne
ะะฒั‚ะพั€

Hi Sven ! Very useful information ! But one important point is that you are currently saving the payment user information in session state variable. What about if the app shut down and you need to re-run or change the server ? Your users will not be able to log in any more without paying.

reflexionesvitales
ะะฒั‚ะพั€

Hi Sven, I have re-done everything in this tutorial and everything works as expected, thanks for guiding us through the tedious Integration process. But I have got a question: when the subscription has expired, what will the UI behave? Will the user not be able to login the SaaS through his email anymore?

P.S. We really enjoy your videos and your teaching style, Sven! Could you please make a tutorial on online marketing, like using Facebook or Instagram ads to promote this SaaS app?๐Ÿคฉ๐Ÿคฉ

PinkPixelRabbit
ะะฒั‚ะพั€

Hi sven, m stuck with some code, in your earlier video of using python code to auto fill word template. Just for an eg I am using a contract where language is same but name of persons vary some times it's just one person and some times it may be 5 persons, can we determine to add or delete the extra lines in template.

shiva
ะะฒั‚ะพั€

What should we do if working in github? Is it secure to commit and deploy the secrets.toml api variables or should we add it we do API keys usually?

nathanham
ะะฒั‚ะพั€

Fantastic tutorial yet again. Thanx so much Sven.

I'm now stuck at "You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure." after hitting the 'Login with Google' button.

I'm running this app on streamlit community cloud and both URIs (Authorised JavaScript origins & Authorised redirect URIs) in the google credentials look fine (one without '/' the other with a trailing '/')

Any help would be much appreciated.

BettingIsCool
ะะฒั‚ะพั€

Great video..Id love to create something using streamlit but think the lack of cookies and need to authenticate after each refresh will drive people mad.

sz
ะะฒั‚ะพั€

Hey thank you for the video, is there a way to move the button out from the side panel?

SebEric-vhzu
ะะฒั‚ะพั€

Hello Sven. Im getting AttributeError: module 'anyio' has no attribute 'CancelScope' after signinig in with google into the app. Do you have any idea what can I try?

Thank you for the information. Great video as always.

tepochate
ะะฒั‚ะพั€

What are the use cases? Streamlit has a lot of limitations. You could make some apps like background image remover, or some AI API application, but the UI and UX that one can make using streamlit is not that good.
Anyways great video like always!

VayunEkbote
ะะฒั‚ะพั€

Hi Sven, i love your Video ๐Ÿ˜Š it is so useful and triable ! Thank you

sujungpark
ะะฒั‚ะพั€

Hello, excellent video as usual.
Can you make a tutorial to only add a Google authenticator to access to a streamlit app, and somehow get the users e-mail ?
Thanks a lot for your great job !

ordaflash
ะะฒั‚ะพั€

Thank you for sharing. It was very helpful. Also, I wanted to ask, if my streamlit application is multi-page, will the subscription work for all pages, or only for pages that import st-paywall

ningshenbj
ะะฒั‚ะพั€

Hello, thank you for the tutorial! Is it possible to deploy the streamlit app with st-paywall to Render?

iIcubeXstudioIi