Loading video player…

Getting Started With marimo Notebooks (Overview)

marimo notebooks redefine the notebook experience by offering a reactive environment that addresses the limitations of traditional linear notebooks. With marimo, you can seamlessly reproduce and share content while benefiting from automatic cell updates and a correct execution order. Discover how marimo’s features make it an ideal tool for documenting research and learning activities.

By the end of this video course, you’ll understand that:

  • marimo notebooks automatically update dependent cells, ensuring consistent results across your work.
  • Reactivity allows marimo to determine the correct running order of cells using a directed acyclic graph (DAG).
  • Sandboxing in marimo creates isolated environments for notebooks, preventing package conflicts and ensuring reproducibility.
  • You can add interactivity to marimo notebooks using UI elements like sliders and radio buttons.
  • Traditional linear notebooks have inherent flaws, such as hidden state issues, that marimo addresses with its reactive design.
Download

Course Slides (.pdf)

2.9 MB
Download

Sample Code (.zip)

3.7 KB

00:00 Welcome to Getting Started With marimo Notebooks. My name is Christopher ,and I will be your guide. This course is about marimo notebooks, and in it you’ll learn about interactive Python notebooks, marimo notebook and what makes it different, how operation order affects notebooks, how to use marimo’s UI widgets, and how to export and manage code and the results you’ve written within the notebook environment.

00:26 The code in this course was tested with marimo 0.14.8. If you’re just playing around with the notebook, that’s all you’ll need. marimo is a third-party library, so it has to be installed with pip or a similar tool and like always, best practice is to use a virtual environment.

00:42 A common use of notebooks is data science, and to demonstrate that I’ll be using some other libraries as well. Namely NumPy 2.30.1, Matplotlib 3.10.3, and to take advantage of the environment reproducibility tools that come with marimo, uv 0.7.13.

01:02 I tested all this with Python 3.13.5, but any supported version should be fine. Later on in the course, I’ll also be installing pandas, but the version there doesn’t matter.

01:12 You’ll see why when you get there.

01:16 Python notebooks have been around for a while. The most common one being Jupyter. marimo is a newer notebook environment, which is very quickly becoming popular.

01:25 You install marimo with pip or its equivalent, and what you get is a locally hosted server. You point your browser at that server and then use the web-based interface to build and play with your notebook.

01:37 A notebook is kind of like a REPL where you can type in some code and get a result. The code goes in a notebook cell. You can put multiple lines of code in a single cell, or spread your code across multiple cells.

01:50 The cells can also contain Markdown, giving you the ability to put instructions or information about what the code is doing in a readable format. As you write to the cells, the results appear in the notebook.

02:02 marimo also ships with UI components, which you can associate with variables in your code. This allows you to make changes to a value with a GUI widget and watch your notebook update on the fly.

02:13 One of the big advantages of marimo is the underlying file format is Python. If you’re coming from other notebooks that use data formats instead, you’ll see this is a big improvement.

02:24 All your existing tools for merging and managing code work with marimo files easily because they’re just Python. Keeping with convention, first up, I’ll write a little Hello, World! notebook to introduce you to the world of marimo.

Become a Member to join the conversation.