# Marimo — Reactive Notebook for Python > Next-gen Python notebook that's reactive, reproducible, git-friendly, and deployable as an app. Replaces Jupyter. 20K+ stars. ## Install Copy the content below into your project: # Marimo — Reactive Notebook for Python ## Quick Use ```bash pip install marimo ``` ```bash # Create a new notebook marimo edit notebook.py # Run as an app marimo run notebook.py # Convert Jupyter notebook marimo convert my_notebook.ipynb > notebook.py ``` --- ## Intro Marimo is a next-generation Python notebook with 20,000+ GitHub stars that fixes everything wrong with Jupyter. Cells are **reactive** — change one cell and all dependent cells automatically re-execute, eliminating hidden state bugs. Notebooks are stored as **pure .py files** (not JSON), making them git-friendly, reviewable, and runnable as scripts. Deploy any notebook as an interactive web app with one command. With built-in SQL support, a rich UI component library, and AI-assisted coding, Marimo is how Python notebooks should have always worked. Works with: Python, Pandas, NumPy, Plotly, Matplotlib, scikit-learn, any Python library. Best for data scientists tired of Jupyter's hidden state and merge conflicts. Setup time: under 1 minute. --- ## Why Marimo Over Jupyter | Feature | Jupyter | Marimo | |---------|---------|--------| | **Reactivity** | Manual re-run cells | Auto-updates dependents | | **File format** | JSON (.ipynb) | Pure Python (.py) | | **Git diffs** | Unreadable JSON diffs | Clean Python diffs | | **Hidden state** | Constant issue | Impossible by design | | **Run as script** | Needs conversion | `python notebook.py` | | **Deploy as app** | Needs Voila/Streamlit | `marimo run notebook.py` | | **SQL support** | Needs extensions | Built-in | ### Reactivity ```python import marimo as mo x = mo.ui.slider(1, 10, value=5) x # Cell 2: automatically re-runs when slider changes result = x.value ** 2 mo.md(f"**{x.value}squared = {result}**") ``` No more running cells out of order. Marimo builds a dependency DAG and ensures consistent state. ### Pure Python Files Notebooks are stored as `.py` files — readable, diffable, and executable: ```python import marimo app = marimo.App() @app.cell def cell1(): import pandas as pd data = pd.read_csv("sales.csv") return data, @app.cell def cell2(data): summary = data.groupby("region").sum() return summary, ``` ### Built-in UI Components Sliders, dropdowns, tables, charts, file upload, date pickers — all reactive and composable. ### SQL Support ```python result = mo.sql(f"SELECT region, SUM(revenue) FROM {sales_df} GROUP BY region") ``` ### Deploy as Web App ```bash marimo run dashboard.py --host 0.0.0.0 --port 8080 ``` --- ## FAQ **Q: What is Marimo?** A: Marimo is a reactive Python notebook with 20,000+ GitHub stars that auto-updates dependent cells, stores notebooks as pure .py files, and deploys as web apps with one command. **Q: Can I convert Jupyter notebooks?** A: Yes. `marimo convert notebook.ipynb > notebook.py` converts any Jupyter notebook. **Q: Is Marimo free?** A: Yes, fully open-source under Apache-2.0. --- ## Source & Thanks > Created by [marimo-team](https://github.com/marimo-team). Licensed under Apache-2.0. > > [marimo](https://github.com/marimo-team/marimo) — ⭐ 20,000+ --- ## 快速使用 ```bash pip install marimo marimo edit notebook.py ``` --- ## 简介 Marimo 是新一代 Python 笔记本,拥有 20,000+ GitHub stars。单元格响应式更新,笔记本存储为纯 .py 文件,一条命令部署为 Web 应用。内置 SQL 支持和 AI 辅助编码。完美替代 Jupyter。 适用于:Python、Pandas、NumPy、Plotly、任何 Python 库。适合厌倦 Jupyter 隐藏状态的数据科学家。 --- ## 来源与感谢 > Created by [marimo-team](https://github.com/marimo-team). Licensed under Apache-2.0. > > [marimo](https://github.com/marimo-team/marimo) — ⭐ 20,000+ --- Source: https://tokrepo.com/en/workflows/9d2b4e76-3baf-415a-a762-94ac48b05888 Author: TokRepo精选