Tips to Level-Up Your Shiny for Python Applications
summary
Built an adaptive filter component on Shiny for Python that prevents empty DataFrames by having filters update each other, using pandas Index.intersection instead of set/list conversions to keep types consistent. Code adds Python type hints to document contracts, refactors repeated UI logic into modules to reduce coupling, and uses pytest and pyite to simulate clicks and assert behavior. A WebAssembly demo runs without installs, and the adaptive filters work: selecting lunch never produces an empty result.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:29Shiny for Python and reactivity
- 7:22Minimal example with filters
- 9:08Keep variable types consistent
- 13:08Use Python type hints
- 16:41Know when to use Shiny modules
- 21:17Make your Shiny app testable
- 23:03Improve developer experience
- 27:42Shiny for Python vs R and others
- 29:51Closing and Q&A
related talks
44mShiny: Data-centric web applications in Python
35mBuild Simple and Scalable Apps with Shiny
19mEditable data frames in Py-Shiny: Updating original data in real-time
44mShiny for Python: Interactive apps and dashboards made easy-ish
21mShiny for Python Machine Learning Apps with pandas, scikit-learn and TensorFlow
18mDiversify Your Career with Shiny for Python
20mSupercharge Your Shiny (for Python) App: Unleashing Interactive Jupyter Widgets
18mAI and Shiny for Python: Unlocking New Possibilities
