marimo Hits 23k Stars: Reactive Python Notebook Replacing Jupyter

By marimo-teamOriginal title: ⭐ marimo-team/marimo (23045 stars)
68AI Score

Open-source project marimo has reached 23k GitHub stars, positioning itself as a 'reactive' Python notebook. It resolves state inconsistency in traditional notebooks by automatically tracking cell dependencies and stores code as pure .py files for Git compatibility. The project aims to consolidate features from Jupyter, Streamlit, and ipywidgets, allowing notebooks to be deployed directly as web apps or scripts.

Full Report

一个响应式 Python notebook,可复现、对 Git 友好,并可作为脚本或应用部署。

文档 · Discord · 示例 · 画廊 · YouTube

| | 简体中文 | |

marimo 是一个响应式 Python notebook:运行某个单元格或与 UI 元素交互时,marimo 会自动运行依赖的单元格(或将它们标记为过期),从而保持代码与输出的一致性。marimo notebook 以纯 Python 格式存储(原生支持 SQL),可作为脚本执行,也可部署为应用。

亮点。

PYTHON
pip install marimo && marimo tutorial intro

立即上手 molab,我们的免费在线笔记本。或者跳转到快速入门,了解我们 CLI 的入门指南。

响应式编程环境

marimo 确保你的笔记本代码、输出和程序状态保持一致。这解决了传统笔记本(如 Jupyter)相关的许多问题。

响应式编程环境。 运行一个单元格后,marimo 会自动反应,即自动运行引用其变量的其他单元格,从而消除了手动重新运行单元格的易错操作。删除一个单元格时,marimo 会从程序内存中清除其变量,消除隐藏状态。

<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" />

<a name="expensive-notebooks"></a>

兼容高开销笔记本。 marimo 允许你将运行时配置为惰性模式,将受影响的单元格标记为过期而不是自动运行它们。这在防止意外执行高开销单元格的同时,保证了程序状态的一致性。

同步 UI 元素。 与UI 元素交互,例如滑块、下拉菜单、DataFrame 转换器和聊天界面,使用这些元素的单元格会自动以最新值重新运行。

<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" width="700px" />

交互式 DataFrame。 分页浏览、搜索、过滤和排序数百万行数据,速度极快,无需编写代码。

<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" />

借助数据感知的 AI 生成单元格。 使用 marimo pair,与你喜爱的智能体(如 Claude Code、Codex 或 OpenCode)协作编写 marimo notebook。或者,在 marimo 编辑器中使用高度专业化的 AI 助手 生成代码,该助手针对数据处理进行了优化,并能感知内存中的变量上下文。你可以自定义系统提示词、自带 API 密钥或使用本地模型。

<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-generate-with-ai.gif" width="700px" />

使用 SQL 查询数据。 构建依赖 Python 值的 SQL 查询,并使用内置的 SQL 引擎将其执行于 dataframe、数据库、lakehouse、CSV、Google Sheets 或其他数据源上,查询结果将以 Python dataframe 形式返回。

<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" />

即使使用了 SQL,你的 notebook 仍然是纯 Python 代码。

动态 Markdown。 使用由 Python 变量参数化的 Markdown,讲述依赖于 Python 数据的动态故事。

内置包管理。 marimo 原生支持所有主流包管理器,允许你在导入时安装软件包。marimo 甚至能够[序列化软件包依赖要求](https://

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)