The Many Ways to Deploy Streamlit Now


I just heard the Solara team unveiled a new platform to deploy Dash, Solara and Streamlit apps!

WASM Platforms

py.cafe is a new WebAssembly powered solution to host and share Python apps through the power of Pyodide.

This is a fancy way to say you can implement a Streamlit meme app in your browser, then copy the URL and send it to a friend, colleague or the CEO of your dream company. Just like this link (hopefully this long weird URL is not going to mark this email as problematic 😅). The receiver gets both the running app, and the source code if that person is curious how embedding a video in Streamlit works.

​

Right now, the Streamlit version is pinned to 1.27.2 and it is missing some fancy optimizations like PyArrow serialization, but both issues are probably in the works.

And py.cafe is looking to add more Python web app frameworks, as there is a vote to add Gradio, Panel or Shiny, and talks for other like Modal or NiceGUI. It would become a default hub for sharing any Python web apps, so it's worth tracking the project.

In the meantime, you can still use the more specific implementations like stlite for Streamlit, shinylive for Shiny or Gradio Playground for Gradio.

​

Non-WASM Platforms

If you want to host more demanding web apps, or rely on Python dependencies that are not available through Pyodide yet, chances are you would have pushed your source code to Github and deployed it on Streamlit Cloud for free. You get an unlimited number of apps, with any URL you want under the .streamlit.app top level domain, and can limit access to apps by email access list. (I haven't tested Streamlit in Snowflake, can't tell you much about this...)

If your app is very ML-Huggingface oriented, and you need the extra power of a NVIDIA GPU, HuggingFace Spaces would be your preferred Streamlit/Gradio option. They recently added Dev mode to connect to the container through SSH, and using the Docker deployment method you can deploy other Python frameworks, plus run a Flask/FastAPI server in the same container to manage some webhooks for you.

Replit just released a guide to deploy a Streamlit chatbot on their Cloud. Might as well add it to my todo list of deployment targets.

The list of platforms I haven't tried yet is a bit long, though Ploomber Cloud, Fly.io and Render are in the top 3 I regularly hear about (and Heroku has just vanished from my map since, you know, the Removal of the Heroku Free Incident). Maybe I need to dedicate an email to compare those 🙃

​

The Cloud Ones

What about AWS, Azure and GCP? Like, it would be amazing to one-click deploy Streamlit to Azure with login through Azure AD, knowing how many businesses went from Office 365 to Azure...oh, one of my frequent Youtube viewers sent me this guide, it might help you configure your Streamlit continuous deployment to Azure with authentication! Feel free to send me interesting resources, I might reshare them here.

For other platforms, I don't have tutorials to recommend other than this kind of community-maintained list.

Ah, I have a quick overview on deploying a Streamlit Docker container to Google Cloud Run on Youtube below:

video preview​

​

To be honest, most of my Streamlit apps are deployed on an on-premise shared machine, sometimes with NGINX on the front, for data protection issues. I did deploy a big FastAPI application on Google Kubernetes Engine once, that was a fun exercise and I do want to talk about Streamlit on Kubernetes in a future episode (★‿★). Maybe even try to build a MVP for Streamlit Cloud in Kubernetes would be a fun tutorial.

​

What's next?

I still haven't started researching my next Youtube video 😅 this last month I have been involved in multiple event photography gigs, meetup talk recording and editing, social media influencer and content marketing mentoring. Unfortunately zero break time for Youtube.

Let's say my last 27 minute video was a season finale and now I'm on a break and preparing for my Youtube season 2. So in the meantime please enjoy those smaller but more regular emails, and find me on my socials.

Enjoy the weekend DataFan!

Brighten your Work with Streamlit/Web Apps and Social Media Videos

Upcoming Youtube tutorials, the latest updates and exclusive resources around Streamlit & friends, GIFs and animations. Directly in your inbox every ~2 weeks.

Read more from Brighten your Work with Streamlit/Web Apps and Social Media Videos

Ever needed to uniquely identify users for your Streamlit app through an email/Google single sign-on page? With version 1.42, Streamlit comes with Native Authentication support through the OpenID Connect protocol. I created a fake Streamlit store app with a sign up button for you to play with Streamlit native authentication through Auth0, an authentication as a service platform that makes it easier to manage multiple social logins like Google, X/Twitter or Linkedin. The app is still live on...

I have suffered 3 weeks on this Google auth in Streamlit thing, my mind is not ready to make a video about it so here's a link to tinker with the source code instead. Bring me to the source code! See below for a longer text recap! Integrating Google OAuth2 Authentication to Streamlit has been an issue for some time, with multiple solutions being developed like streamlit-oauth, st_oauth's prototype by the Streamlit team or streamlit-google-auth. But for the past months, I have been building...

A week ago, I was sitting in an airport cafe, ready to wait 3 hours for a plane from Manchester back to Paris, followed by a 4 hour train trip to the South of France. Those long business trips are my usual gateway to catch up on "things I want to learn but never have time to". I would load up on hour-long entrepreneurship podcasts and rediscover books about Marketing from Seth Godin. But the morning in this airport cafe, I stumbled upon Next.js's File-based routing system. Each folder maps to...