Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 2.39 KB

README.md

File metadata and controls

58 lines (43 loc) · 2.39 KB

Examples

This folder contains example marimo notebooks, meant to teach you how to use marimo's features as well as inspire you to make awesome notebooks.

  • 🖱️ ui/: how to use UI elements or widgets
  • 🛢️ sql/: how to use SQL in marimo
  • control_flow/: how to control cell execution and output display
  • 📝 markdown/: how to write markdown, including dynamic markdown
  • 📽️ layouts/: how to present notebooks as slides, add sidebars, and more
  • 🤖 ai/: AI-related examples
  • 🧪 testing/: how to test marimo notebooks, and use marimo notebooks as tests
  • 📦 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 intro at the command line first!

Tip

Check out our public gallery of interactive notebooks to get inspired.

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 uv
  2. Open an example with marimo edit --sandbox <notebook-url>.

For example:

uvx marimo edit --sandbox https://github.com/marimo-team/marimo/blob/main/examples/misc/seam_carving.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, in which case you'll need to manually install marimo first. Then run marimo edit <notebook.py>; however, you'll also 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!