Export Formats
marimo can export notebooks to multiple formats:Exporting to HTML
Create standalone HTML files with embedded outputs.Basic Export
- All cell outputs (plots, tables, text)
- Optional source code
- Styling and formatting
Options
Passing Arguments
Export with custom CLI arguments:WebAssembly (WASM) Export
Export fully interactive notebooks that run entirely in the browser using Pyodide.Basic WASM Export
Features
Complete Self-Contained
Complete Self-Contained
The exported HTML includes:
- Python runtime (via Pyodide)
- All notebook code
- Required assets
- No server needed!
Show/Hide Code
Show/Hide Code
Cloudflare Workers
Cloudflare Workers
Generate Cloudflare Worker config for easy deployment:Creates
index.js and wrangler.jsonc for deployment.Serving WASM Files
Package Compatibility
Pyodide supports most pure-Python packages. Some packages with C extensions may not work. Check the Pyodide package list.
Exporting to PDF
Create printable PDF reports from your notebooks.Basic PDF Export
Options
Advanced Configuration
Rasterization Options
Rasterization Options
For better rendering of interactive widgets:
Export Method
Export Method
PDF export requires
nbformat and nbconvert packages:Export to Script
Convert to a flat Python script in topological order.- Executes cells in dependency order
- Removes marimo-specific decorators
- Can be run as a standard Python script
Export to Markdown
Export as markdown with code fences:Requires
nbformat:Deploying as Web Apps
Running on a Server
Deploy marimo notebooks as web applications:Docker Deployment
ExampleDockerfile:
Cloud Platforms
Deploy to Cloudflare
Use WASM export with
--include-cloudflare flag, then:Deploy to Heroku
Create
Procfile:Version Control
marimo notebooks are pure Python files, making them ideal for Git.Best Practices
1
Track .py files
Commit your notebook
.py files directly:2
Readable diffs
Since notebooks are Python code, diffs are human-readable:
3
Ignore outputs
No need to track outputs - they’re generated at runtime:
.gitignore
Collaboration
Workflow for teams:- Create a branch for your analysis
- Edit the notebook with
marimo edit - Commit changes to the
.pyfile - Create pull request with readable diffs
- Review code like any Python file
- Merge when approved
Sharing on GitHub
README Examples
Reference notebooks in your README:README.md
Next Steps
Converting from Jupyter
Migrate existing
.ipynb notebooksPackage Management
Manage dependencies with PEP 723