Jul 16 (edited) in 🥇 Wins
Streamlit Template for complex MVP
TL;DR
Streamlit is a good choice whenever you want to experiment before committing to the Typescript madness.
However, poor folder organization will make your app a disaster.
When the app becomes complex, you need to organize your code carefully.
A nice trick is to build your web app just like NextJS.
Organize and build components into a Layout that is shared across all the pages and enjoy a dynamic web app without the struggle of multiple pages.
Create a UI main class, that inherits from multiple classes:
  • Header
  • Main
  • Footer
  • Sidebar
  • API
This approach is based on the Multilevel and Multiple Inheritance of classes in OOP.
Having multiple classes will allow you to manage your code and extend your UI.
To handle the different logic and do not get lost, use loguru.
is a very cool library for python that helps you deal with logs ( better than print statements )
I have created a small template to start my new projects, inspired by the cookie-cutter concept.
I will update it in the future and every feedback is welcome :)
9
6 comments
Davide Lupis
4
Streamlit Template for complex MVP
Data Alchemy
skool.com/data-alchemy
Your Community to Master the Fundamentals of Working with Data and AI — by Datalumina®
Leaderboard (30-day)
powered by