Skip to main content

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:
  1. Analysis — Sphinx examines your notebook’s code, outputs, and flow
  2. Conversion — Key elements are transformed into Streamlit components
  3. Generation — A complete Streamlit application is created
  4. Preview — You can run and test the app locally

What Gets Converted

Sphinx intelligently converts your notebook elements:
Notebook ElementStreamlit Component
DataFramesst.dataframe() with filtering
Matplotlib/Plotly chartsInteractive visualizations
Markdown cellsst.markdown() sections
VariablesUser inputs (sliders, dropdowns)
Analysis flowLogical 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
Build your analysis in Agent or Plan mode first, then convert to Streamlit when you’re ready to share. This workflow lets you iterate quickly before creating the final application.

Creating a Streamlit App

To convert your notebook to a Streamlit app:
  1. Complete your analysis in the notebook
  2. Select Streamlit from the mode selector
  3. Optionally provide guidance about what to include
  4. 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