5 Things I Wish I Knew Before Learning Streamlit

Would you like to understand the main limitations of the Streamlit Python library for building data web apps, before picking it up for a project?
In this video, I'll cruise through 5 obstacles that regularly come back within the community and multiple ways/hacks/techniques to work around those limits. You'll find out:
- how to hack markdown and iframe to style your app
- if it's possible to alter the Streamlit rerun event loop and Tornado Backend server
- thoughts to build a desktop app from your Streamlit app
- where is the ipywidgets integration into Streamlit at
After you watch me show you all those advanced techniques, you should have a good idea of Streamlit's limits and ways to go around Streamlit's "run from top to bottom philosophy" to meet your ends.
📧 My email list to keep up to date with the latest news, tutorials and resources about Streamlit & friends ➡ andfanilo-newsletter.streamli...
💰 Buy me a coffee to stay awake while editing ➡ www.buymeacoffee.com/andfanilo
🗣️ Find my socials ➡ andfanilo.com
🔗 Links
- Is Streamlit useful: discuss.streamlit.io/t/is-str...
- Partial reruns: github.com/streamlit/streamli...
- Using PyInstaller for Streamlit: discuss.streamlit.io/t/using-...
- ipywidgets in Streamlit?: discuss.streamlit.io/t/ipywid...
👉 My tools (Affiliate links to support me!)
- 📷 Main Camera - amzn.to/3QvTosB
- 📷 Main Lens - amzn.to/3svYCwq
- 🎙️ Microphone - amzn.to/47l5ewA
- 🎵 Music & Sound Effects - www.epidemicsound.com/referra...
- 📕 Streamlit Official Book - amzn.to/3QuRPwl
00:00 Intro
00:45 Fixed Branding
04:38 Looper
08:31 Hidden Tornado Server
12:17 Not an Executable
17:02 Refuse ipywidgets
20:30 Creativity in Constraints
______
🖋 "Instead of freaking out about these constraints, embrace them. Let them guide you. Constraints drive innovation and force focus. Instead of trying to remove them, use them to your advantage." - 37Signals, Getting Real: The Smarter, Faster, Easier Way to Build a Web Application
⚠️ Disclaimer: This video is not sponsored, I receive no compensation by any brand quoted in this video. Views are my own and do not represent my employer's.
Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. Thank you for supporting my channel so I can continue providing you with free content!
#streamlit #python #datascience #dataapps

Пікірлер: 66

  • @sehmiconscious
    @sehmiconscious4 ай бұрын

    "Python loop-running machine" is the best description of Streamlit ever!

  • @andfanilo

    @andfanilo

    4 ай бұрын

    Ahah! well this description has been in my mind for a long time, and I really wanted to make a video around this looper idea, which was kind of the genesis for this video 😂

  • @mko-ai
    @mko-ai3 ай бұрын

    I dont know why this thumbnail with "streamlit is limited" is so genius, one of my favorite things.

  • @saisaigraph1631
    @saisaigraph1631Ай бұрын

    not only educative but also entertaining + fun... Thank you very much Fanilo

  • @andfanilo

    @andfanilo

    Ай бұрын

    Thank you for the kind words 🙂 hope to see you on the next video!

  • @data01010
    @data0101010 күн бұрын

    loved the video delivery, kudos

  • @andfanilo

    @andfanilo

    10 күн бұрын

    Thanks a ton for the support :) see you in the next one !

  • @z.r.777
    @z.r.7774 ай бұрын

    14:05 OMG! That was toooooo much truth. It's painfully accurate 😢

  • @andfanilo

    @andfanilo

    4 ай бұрын

    Ahah Every frickin’ time, maybe I should switch to Excel tutorials at this point 😂 how did it go with your users afterwards??

  • @CodingIsFun

    @CodingIsFun

    4 ай бұрын

    @@andfanilo The most requested feature in every app: The download to Excel button. It is the story of my life 😅

  • @andfanilo

    @andfanilo

    4 ай бұрын

    Ahah it’s crazy how many times I’ve heard this from colleagues and customers 😂 how many legacy processes rely on Excel file processing I wonder ahah

  • @darkcss1054
    @darkcss10544 ай бұрын

    Your videos, specially your Streamlit react component tutorial, have inspired me to dive deeper in the universe of JavaScript. I am planning to go the route of learning React.js, Next.js and TailwindCSS. Do you think it's a wise option to develop more large scale applications with authentication and data viz JS libraries? What path would you recommend?

  • @andfanilo

    @andfanilo

    4 ай бұрын

    Eheh :) I feel the deeper insight of my channel is to not be scared of JS and try it at least once One day at work, I was "attacked" by a senior architect telling me he would never put Dash code in production because he couldn't trust any Python framework generating React code. That's the day I started working on 2 Vue.js projects and going into the JS journey. Maybe it is still subconscious in my videos 😂 Maybe not "large-scale", but I do think it's good to build a small SPA in full JS with 2-3 input + graphs and some CSS animations at least once in your life (not FastAPI serving Next.js, but going the full Node.js route). Then you get a grasp of how Streamlit/Dash generate React code, if you need to explain architects how those can be optimized. Ultimately you should feel comfortable with Python libraries like Solara or NiceGUI, or even spin your FastAPI serving HTMX/Alpine.js or SvelteKit/Next.js, for tools that are more "flexible", less "black-box magic" than Streamlit React/Next.js is a great option, React has so many great libraries. Yet if I were to do a new side project for a video right now, I'd look at Svelte/SvelteKit, the barrier of entry looks far lower and closer to HTML/CSS/JS than React is, so you "should" get at quicker results. Plus you can write Svelte components in both Streamlit and Gradio, a good win. I'd keep Tailwind for CSS.

  • @user-sc8uu2vx9r
    @user-sc8uu2vx9r4 ай бұрын

    if anyone else on earth can understand this entire video you have reached god like status. this guy knows everything about everything

  • @andfanilo

    @andfanilo

    4 ай бұрын

    😆 next video "How to become a Streamlit God"

  • @pranitrock

    @pranitrock

    4 ай бұрын

    I actually wanted to know the exact the about the libraries you shown in the video. Also I understood all of it, as I have developed in streamlit for a year them switched to nicegui also got the honour to provide a contribution to the library component of nicegui, have used panel little bit. But I am a bit disappointed you missed out flet and streamsync. These libraries deserve more love I believe. Still don't feel like God level status but ya some of my peers do say that while referring to me, but I am also hungry for even more more coding knowledge. 😅

  • @andfanilo

    @andfanilo

    4 ай бұрын

    @@pranitrock i did talk about flet at the end of the video 😁 I also missed on streamsync , taipy, chainlit, there are so many libraries to read about, try, compare, contribute to… so we must keep learning and pushing the boundaries of Python web apps! I personally don’t consider myself a god of Python ahah, I’m just a curious tech saavy user who loves to produce videos about my experiences :) Glad you’re enjoying the journey with NiceGUI. It’s a library I wanted to talk about in a video for a while, looking forward to have time to do one about it. If I could I would do a separate video for each of those libraries, but eh time is scarce 🤣

  • @pranitrock

    @pranitrock

    4 ай бұрын

    @@andfanilo yup just noticed it at the end. I really enjoy your content. Keep up the good videos. 👍🏻

  • @syedusa1611
    @syedusa16114 ай бұрын

    Insightful. I tried to convert my streamlit app to desktop using electronJs but it seems like it doesn't support threading or queue. Similarly, I would appreciate if you could suggest some framework/libraries with modern ui components (like that of streamlit) for quick desktop app, which can be converted to executable file.

  • @andfanilo

    @andfanilo

    4 ай бұрын

    Hey, I've recommended Flet ( flet.dev/ ) in the video, that may be the one with the most "modern" look and uses Flutter SDK instead of PyInstaller to package. That *may* work around the threading/queue part The more native libraries like PySimpleGUI/Gooey/PyQT5 create executables that look pretty much like you classical Desktop app, but maybe if you're in a rush they will be helpful for you Packging a Python web app as an executable is an absolute pain, which is why I prefer to recommend deploying on an on-prem server or in the Cloud and send the URL to your colleague...I know it's not always possible but really, packaging web to desktop is a much worse experience 😕

  • @theexposer9483

    @theexposer9483

    Ай бұрын

    The more you dig deep in Streamlit more dead ends you will find. It is not for any serious stuff, even thinking of using websocket as data pipe in Streamlit is prohibited .

  • @zkiyyeller3525
    @zkiyyeller3525Ай бұрын

    Awesome Video which tts did you use for this? for the tldr? 1176 seconds

  • @andfanilo

    @andfanilo

    Ай бұрын

    Hello, thanks for watching! It was probably ElevenLabs for this video 🤔 ( elevenlabs.io/ )

  • @PauloRoberto-vj4jb
    @PauloRoberto-vj4jb4 ай бұрын

    Hello!! Hey, thanks for your content on streamlit, very helpful! Is there a channel in with we can send questions for you? I’m struggling with the intent to put a image logo above multi-page apps structure, but I dont know nothing about FE/CSS :D Thank you in advance sir

  • @andfanilo

    @andfanilo

    4 ай бұрын

    Hello! I have no « FAQ » channel like this for now (because time is short 😅) but maybe check github.com/arnaudmiribel/streamlit-extras/extras/app_logo/ Have a nice day!

  • @Sonntagssoziologe
    @Sonntagssoziologe2 ай бұрын

    I had to cry because of my Streamlit lessons. Lost in time like tears in the rain.

  • @VictorDlocalhost
    @VictorDlocalhost4 ай бұрын

    Buen video. Seria genial interactuar con los eventos de los puntos de las figuras de los graficos con Ploty asi como highchart para poder recargar otras componenentes de la aplicación.

  • @andfanilo

    @andfanilo

    4 ай бұрын

    Sí, necesitamos construir y mantener un nuevo proyecto para esto. Si eres valiente puedes hacerlo tu mismo :) dev.to/andfanilo/streamlit-components-scatterplot-with-selection-using-plotly-js-3d7n

  • @VictorDlocalhost

    @VictorDlocalhost

    4 ай бұрын

    @@andfanilo mmmmmmm

  • @nessrinetrabelsi8581
    @nessrinetrabelsi85812 ай бұрын

    What about mobile apps? If I want to have a multi/cross-platform code, is streamlit suitable? or do you recommend another similar tool/framework?

  • @andfanilo

    @andfanilo

    Ай бұрын

    Streamlit builds a responsive web app, so you can access the url from a smartphone and the app will adapt to the screen size But it’s not a native mobile app. The only Python alternative I heard about for cross platform is Flet, though I have not tried it yet If you do try it, I’d love your feedback here!

  • @nessrinetrabelsi8581

    @nessrinetrabelsi8581

    Ай бұрын

    @@andfanilo Thank you!

  • @maxlgemeinderat9202
    @maxlgemeinderat92024 ай бұрын

    Can you confidently sell Streamlit apps (eg. Llm Chat Rag App) to clients or would you more lile switch to an alternative?

  • @andfanilo

    @andfanilo

    4 ай бұрын

    I've seen multiple manual monetization strategies: - Stripe integration + Google Auth with st-paywall github.com/tylerjrichards/st-paywall (could probably build an easier way through Gumroad License keys for example) - embedding a Streamlit app in an of a paywalled website, or as an external web service behind a Javascript paywall - deploying a private Streamlit app to Streamlit Cloud and adding authorized email accounts of people that paid - just selling an app as a final product of a paid consultation, deployed on their servers or in your own Cloud project with limited access But so far no native answer for this. I do think the other Python solutions require as much stitching as Streamlit. Though managing subscription might be easier in other solutions like Dash, they will require a bit of coding I should write this down as a video idea for later 🤔

  • @cgagel607

    @cgagel607

    4 ай бұрын

    ​@@andfanilo I would love a video like this, I'm a big fan of your content and contributions to the Streamlit community! Where do you see Streamlit in the next 2-3 years? There have already been so many nice features added in just the last 2 years, do you think the gaps in the Streamlit framework you mentioned may be fixed in the future?

  • @LouisDeconinck

    @LouisDeconinck

    27 күн бұрын

    ​@@andfanilo I would love a video on this topic.

  • @socassiopee
    @socassiopee4 ай бұрын

    Petit cœur pour le référencement, comme convenu 🙃

  • @andfanilo

    @andfanilo

    4 ай бұрын

    Non KZread, promis ce n'est pas un robot payé pour booster mes vidéos 😂 Merci pour le soutien 🙂 je pense que tu peux me trouver à peu près partout sur le Web avec mon nom de profil!

  • @dhmkkk
    @dhmkkk3 ай бұрын

    Hi Love your videos would you consider making some videos on chainlit would be fun !!

  • @andfanilo

    @andfanilo

    3 ай бұрын

    Hello, thanks for the support! I’ve been asked multiple times about chainlit, I think I’m going to do a poll about it 🙃 what would you like to see in a chainlit video ?

  • @dhmkkk

    @dhmkkk

    3 ай бұрын

    @@andfanilo I have seen people make simple chatbots on youtube but making a custom chatbot modifying the ui like you do in streamlit but for chainlit would be something interesting i guess!

  • @andfanilo

    @andfanilo

    3 ай бұрын

    @@dhmkkk I like this idea 😀 my "hacky customize Streamlit" videos do seem to do pretty well, a Chainlit version could be a great outlier on KZread!

  • @dhmkkk

    @dhmkkk

    3 ай бұрын

    @@andfanilo great looking forward to it!!!

  • @saylip2674
    @saylip267413 күн бұрын

    I was trying create a streamlit app to plot a 2D slice of a brain region and I want to add and delete points from that 2D slice respresentation. Is it possible through the streamlit app to make it interactive? Like the user can click on any co-ordinate and add a point or click on an existing point and delete it? Is it possible or should I use some other app? Please can you guide me?

  • @andfanilo

    @andfanilo

    11 күн бұрын

    Hello! I think it would be possible with drawable canvas, but I wonder with the switching between multiple 2D slices + manipulating add/deletion for each 2D slice level and storing all point info in session state, all with Streamlit rerunning on every interaction, if Streamlit is the best bet... Haven't tried it, but usually I check Gradio after Streamlit before checking Panel/Dash/Solara...Gradio seems to let you access clicked point coordinates of the image eventdata with the Image.select() method natively ( github.com/gradio-app/gradio/pull/3786 & github.com/gradio-app/gradio/blob/main/demo/image_selections/run.py ) and you can edit the slice after reacting to the event. I can't try it yet, because I'm out of home for a few days to film a corporate event, but this right now would be my first try. I'll let you know if I stumble on another idea. I hope my writing while travelling makes a bit of sense :)

  • @saylip2674

    @saylip2674

    Күн бұрын

    @@andfanilo Thank you so much for helping! I'll try using Gradio and let you know.

  • @larrysonjoelrakotonarivo3802
    @larrysonjoelrakotonarivo38024 ай бұрын

    salut ^_ Mba mangataka vidéo teny gasy ra mba mety :) Streamlit to exe file :') Fa mahay ianao ^^

  • @sitrakaforler8696
    @sitrakaforler869628 күн бұрын

    hahaha bon après ils sont hnnêtes dessus mais en tout cas oui tu as raison Fanilo x)

  • @andfanilo

    @andfanilo

    26 күн бұрын

    Ahah je suis totalement d'accord qu'ils le disent assez ouvertement, mais j'ai toujours un petit nombre d'individus qui veulent critiquer sans lire alors je me dis, autant les appâter avec cette vidéo x)

  • @Jasruler
    @Jasruler2 күн бұрын

    Le Sserafim mentioned

  • @andfanilo

    @andfanilo

    2 күн бұрын

    👀 and maybe it's not the only video with a mention...