Notebooks as code
This email is part of our "10 days of marimo" onboarding series, with tips to help you get started.
marimo notebooks are stored as pure Python files, not JSON. This has several benefits:
- Version notebooks with Git, with small code changes yielding small diffs
- Execute notebooks as Python scripts
- Test notebooks with pytest or doctests
- Serialize package requirements in notebook files
- Reuse cells across other notebooks
- Embed notebooks in other notebooks
Sometimes, however, it's helpful to store notebook outputs alongside your code. For these cases, marimo lets you automatically snapshot outputs as ipynb or HTML to an auxiliary __marimo__ directory using the notebook settings menu.
Notebooks as reusable artifacts
Unlike Jupyter notebooks, which are usually scratchpads, marimo notebooks are reusable software artifacts. You can marimo notebooks in three ways:
- marimo edit notebook.py: explore data and run experiments, like a traditional notebook
- marimo run notebook.py: run your notebook as an interactive web app
- python notebook.py: execute your notebook as a Python script
Exporting to other formats
marimo notebooks can be exported to many other formats, including PDF, Jupyter notebook (ipynb), Markdown, static HTML, and more. Use our native format for everyday use, and bridge to other toolchains and ecosystems with our official exporters.
Converting Jupyter notebooks to marimo
It's easy to convert Jupyter notebooks to marimo notebooks. In fact, the conversion is so easy that it's fun!
You are receiving this email because you opted in to receive email from the list 10 Days of marimo from marimo
marimo, Planet Earth
marimo, Planet Earth