streamlit-to-marimo
Converting Streamlit Apps to Marimo
For general marimo notebook conventions (cell structure, PEP 723 metadata, output rendering, marimo check, variable naming, etc.), refer to the marimo-notebook skill. This skill focuses specifically on mapping Streamlit concepts to marimo equivalents.
Steps
-
Read the Streamlit app to understand its widgets, layout, and state management.
-
Create a new marimo notebook following the
marimo-notebookskill conventions. Add all dependencies the Streamlit app uses (pandas, plotly, altair, etc.) — but replacestreamlitwithmarimo. You should not overwrite the original file. -
Map Streamlit components to marimo equivalents using the reference tables below. Key principles:
- UI elements are assigned to variables and their current value is accessed via
.value. - Cells that reference a UI element automatically re-run when the user interacts with it — no callbacks needed.
- UI elements are assigned to variables and their current value is accessed via
-
Handle conceptual differences in execution model, state, and caching (see below).
-
Run
uvx marimo checkon the result and fix any issues.
Widget Mapping Reference
More from marimo-team/skills
marimo-notebook
Write a marimo notebook in a Python file in the right format.
2.5Kmarimo-batch
An opintionated skill to prepare a marimo notebook to make it ready for a scheduled run.
1.6Kanywidget-generator
Generate anywidget components for marimo notebooks.
1.4Kjupyter-to-marimo
Convert a Jupyter notebook (.ipynb) to a marimo notebook (.py).
1.3Kwasm-compatibility
Check if a marimo notebook is compatible with WebAssembly (WASM) and report any issues.
1.1Kimplement-paper
Implement a research paper as an interactive marimo notebook together with the user. Start by understanding what the user wants to explore, fetch the paper via alphaxiv, then build a focused notebook.
882