A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
# /// script
# dependencies = ["matplotlib", "numpy", "pandas", "scikit-learn", "seaborn", "transformers"]
# ///
import marimo
app = marimo.App()
@app.cell
def _():
import subprocess
return (subprocess,)
@app.cell
def _():
# packages added via marimo's package management: transformers !pip install transformers
return
@app.cell
def _():
# packages added via marimo's package management: pandas numpy matplotlib !pip install pandas numpy matplotlib
return
@app.cell
def _():
# Mixed cell with pip and other commands
# packages added via marimo's package management: scikit-learn !pip install scikit-learn
import numpy as np
# packages added via marimo's package management: seaborn !pip install seaborn
@app.cell
def _(subprocess):
# Non-pip exclamation commands should remain unchanged
#! ls -la
subprocess.call(['ls', '-la'])
#! echo 'Hello World'
subprocess.call(['echo', 'Hello World'])
@app.cell
def _():
# Magic pip command should also be handled
# '%pip install requests' command supported automatically in marimo
return
if __name__ == "__main__":
app.run()