marimo/examples at main ยท ag-python/marimo

This folder contains example marimo notebooks.

  • ๐Ÿ–ฑ๏ธ ui/: marimo's many UI elements or widgets
  • ๐Ÿ›ข๏ธ sql/: using marimo's SQL cells
  • ๐Ÿ“ฝ๏ธ layouts/: present notebooks as slides, add sidebars, and more
  • ๐Ÿค– ai/: AI-related examples
  • ๐Ÿ“ฆ third_party/: using popular third-party packages in marimo
  • โ˜๏ธ cloud/: using various cloud providers
  • ๐Ÿงฉ frameworks/: integrating with different frameworks (web/ASGI)
  • โœจ misc/: miscellaneous topical examples

Tip

New to marimo? Run marimo tutorial ui at the command line first!

Note

Submit a pull request to add an example! We especially welcome library developers to add examples to third_party/.

Running examples

The requirements of each notebook are serialized in them as a top-level comment. Here are the steps to open an example notebook:

  1. Install marimo
  2. Install uv
  3. Open an example with marimo edit --sandbox <notebook-url>.

For example:

marimo edit --sandbox https://github.com/marimo-team/marimo/blob/main/examples/ui/reactive_plots.py

Tip

The --sandbox flag opens the notebook in an isolated virtual environment, automatically installing the notebook's dependencies ๐Ÿ“ฆ

You can also open notebooks without uv, with just marimo edit <notebook.py>; however, you'll need to install the requirements yourself.

More examples ๐ŸŒŸ

Every week, we highlight stellar examples and projects from our community. Check them out at our marimo spotlights repo!