Skip to main content

mo.App

The App class is the core container for marimo notebooks. It represents a collection of cells that form a reactive computational graph.

Overview

A marimo app is created using the @app.cell decorator to define cells. The app manages the reactive execution of cells based on their dependencies.

Creating an App

App Configuration

'normal' | 'medium' | 'full'
default:"'normal'"
Controls the width of the notebook layout
str
Title displayed in the browser tab
str
Path to custom CSS file for styling

Decorators

@app.cell

Defines a cell in the marimo app. Cells are executed reactively based on their dependencies.
bool
default:"False"
Whether to hide the cell code in app mode
bool
default:"False"
Whether the cell is disabled

Running Apps

Apps can be run in three modes:
  1. Edit mode: Interactive development environment
  1. Run mode: View-only app with optional code hiding
  1. Script mode: Execute as a Python script

Programmatic Execution

App Methods

app.run()

Execute the app as a script. This runs all cells in dependency order.

app.export_html()

Export the app to a standalone HTML file.

ASGI Integration

Create an ASGI app for deployment:
Apps are stored as pure Python files, making them git-friendly and executable as scripts.

Cell

Learn about marimo cells

Creating Notebooks

Guide to creating marimo notebooks