Coming from Jupytext¶
If you’re familiar with Jupytext, you’ll find that marimo offers similar
functionality for working with notebooks as Python files, but without the need
for additional setup or synchronization issues because marimo notebooks
are stored as .py
files by default. However, Jupytext works with IPython
notebooks, whereas marimo works with marimo notebooks, which are not based
on IPython/Jupyter. Here’s a comparison to help you transition smoothly.
Notebook Format¶
Jupytext |
marimo |
Jupytext uses comments or special markers to define cell types in notebooks. |
Notebooks are pure Python ( |
Converting Jupyter notebooks¶
From .ipynb
¶
Jupytext |
marimo |
|
|
From py:percent notebooks to marimo notebooks
If you have a Python file encoded in the py:percent format, you can convert it to a marimo notebook in two steps:
jupytext --to notebook.ipynb percent_notebook.py
marimo convert notebook.ipynb > marimo_notebook.py
To .ipynb
¶
Jupytext |
marimo |
|
|
Editing Notebooks¶
Jupytext |
marimo |
Requires synchronization between |
Edit marimo notebooks files directly in the marimo editor ( |
Executing Notebooks¶
Jupytext |
marimo |
Use Jupyter to edit notebooks interactively, or Papermill to execute notebooks from the command line. |
In addition to running notebooks interactively ( |
Version Control¶
Jupytext |
marimo |
Jupyter notebooks are stored as JSON by default, making them difficult to meaningfully version with git. Use Jupytext to pair and synchronize jupyter notebooks with text representations for smaller git diffs. |
Notebooks are already in |
Markdown and Code Cells¶
Jupytext |
marimo |
Uses special markers or formats to distinguish cell types. Magical syntax is required. |
Uses |
Deployment¶
Jupytext |
marimo |
Requires migrating to other libraries like Voila or Streamlit for deployment. |
Can be deployed as interactive web apps with |