Overview
Streamlit mode transforms your notebook analysis into an interactive web application. With a single click, Sphinx converts your data exploration, visualizations, and insights into a shareable Streamlit dashboard that stakeholders can interact with.Streamlit mode creates a standalone Python application from your notebook work—perfect for sharing insights with non-technical stakeholders.
How It Works
When you activate Streamlit mode:- Analysis — Sphinx examines your notebook’s code, outputs, and flow
- Conversion — Key elements are transformed into Streamlit components
- Generation — A complete Streamlit application is created
- Preview — You can run and test the app locally
What Gets Converted
Sphinx intelligently converts your notebook elements:| Notebook Element | Streamlit Component |
|---|---|
| DataFrames | st.dataframe() with filtering |
| Matplotlib/Plotly charts | Interactive visualizations |
| Markdown cells | st.markdown() sections |
| Variables | User inputs (sliders, dropdowns) |
| Analysis flow | Logical app structure |
When to Use Streamlit Mode
Streamlit mode is ideal for:- Stakeholder presentations — Share interactive dashboards
- Data exploration tools — Let others filter and explore your data
- Reporting — Create self-service analytics
- Prototyping — Quickly build data app MVPs
- Documentation — Interactive examples and tutorials
Creating a Streamlit App
To convert your notebook to a Streamlit app:- Complete your analysis in the notebook
- Select Streamlit from the mode selector
- Optionally provide guidance about what to include
- Sphinx generates the Streamlit application code
Best Practices
- Clean your notebook first — Remove experimental cells and failed attempts
- Add clear markdown headers — These become section titles in the app
- Use meaningful variable names — They may become user-facing labels
- Include visualizations — Charts make the most impactful Streamlit apps
- Test interactivity — Ensure filters and inputs work as expected