What's Changed
Highlights
⚡️ Reactive module autoreloading. marimo now ships with the most advanced module autoreloader out of any interactive Python programming environment. When enabled (via the notebook settings menu), marimo automatically react to modifications made to packages and modules that your notebook imports. This lets you develop complex logic in Python modules, using an editor of your choice, and use the marimo notebook as a DAG or main script that orchestrates your logic.
Autoreloading comes in two flavors:
- “detect”: automatically marks cells affected by module modifications as stale, letting you know which cells need to be re-run.
- “autorun”: automatically re-runs cells affected by module modification.
Thanks @MartinBernstorff, @astrowonk for the feature request!
⛓ Command-line arguments. Give arbitrary command-line arguments to your notebook, and read them with mo.cli_args()
: this works in edit
and run
modes, and also while running as a script.
marimo edit notebook.py -- -arg1=foo -arg2=bar
marimo run notebook.py -- -arg1=foo -arg2=bar
python notebook.py -arg1=foo -arg2=bar
Thanks @twrightsman for the feature request!
📄 Programmatic HTML export. Long requested, finally here: use marimo export html
at the command-line to export your notebooks as beautiful documents:
- to HTML:
marimo export html notebook.py -o notebook.html
- with CLI args:
marimo export html notebook.py -o notebook.html -- -arg1=foo -arg2=bar
Thanks @egemenimre, @scls19fr, @bmeyers for the feature request!
🔎 Check if running in a notebook. Use mo.running_in_notebook()
to tell whether Python is executing inside a marimo notebook. Use this when developing library code that integrates with marimo, or to tell whether your notebook file is running via the notebook kernel or as a Python script.
P.S. Check out our new guide on integrating your objects with marimo.
Full changelog
- fix: latex line-height by @mscolnick in #1136
- fix: send app-config in kernel ready response by @mscolnick in #1133
- improvement: move html export logic to python code by @mscolnick in #1135
- feat: reactive reloading of modified modules by @akshayka in #1139
- refactor parse_dataclass.py by @fuenfundachtzig in #1082
- chore: use ruff to auto add returns by @mscolnick in #1143
- feat: marimo export html cli by @mscolnick in #1141
- fix: use data urls for vfiles when running as a script by @akshayka in #1145
- Update deploying_docker.md by @jettil in #1147
- feat: mo.cli_args by @mscolnick in #1146
- improvement: running as script - only start event loop when needed by @akshayka in #1148
- feat: add cli args to html export by @akshayka in #1151
- improvement: modernize filename dropdown by @mscolnick in #1153
- fix: grid editor when bordered by @mscolnick in #1154
- feat: CLI args when running as a script by @akshayka in #1150
- feat: mo.running_in_notebook() by @akshayka in #1155
- chore: add marimo shields by @mscolnick in #1156
- chore: ignore /var tmp directory in homepage by @akshayka in #1157
- fix: dont drop async prefix when re-formatting cell signature by @akshayka in #1167
- docs: integrations guide by @akshayka in #1158
- fix: fix plotly re-rendering and re-mounting state by @mscolnick in #1169
- 0.4.1 by @akshayka in #1168
New Contributors
Full Changelog: 0.4.0...0.4.1