Skip to main content

A minimal solution for exporting marimo notebooks to markdown *with* rendered HTML outputs, designed for mkdocs/zensical sites.

Project description

marimo-md-export

PyPI version Python versions License CI Docs

A uv tool that wraps marimo export, extracts rendered outputs from the HTML export, and injects them into the markdown export. The result is a self-contained markdown document with embedded figures (as base64 <img> tags) and tables (as GFM or HTML).

Full documentation

Quick start

Mark cells in your marimo .py notebook with # @output: <label>:

# @output: my_figure
fig, ax = plt.subplots()
ax.plot(x, np.sin(x))
fig

Then run:

uvx marimo-md-export notebook.py output.md

If you want the tool to be available globally you can "install" it with

uv tool install marimo-md-export

Integrating with documentation sites

marimo-md-export is designed to produce markdown pages for static site generators like mkdocs (Python) or zensical (Rust). Both work identically for this purpose.

1. Add as a docs dependency:

uv add --group docs marimo-md-export

2. Add a build step that converts your notebook(s) before building the site.

For example, this project uses the following just command to build the docs:

docs:
  marimo-md-export examples/notebook.py docs/example.md \
    --html-output docs/example-notebook.html
  zensical build

This runs marimo-md-export to produce a self-contained markdown page (with any # @output: cells injected as figures/tables), then builds the site.

Development

uv sync  # sync packages
just  # run lint, typecheck, test, build docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marimo_md_export-0.2.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marimo_md_export-0.2.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file marimo_md_export-0.2.1.tar.gz.

File metadata

  • Download URL: marimo_md_export-0.2.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for marimo_md_export-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5edfa4051eb3b05055af5435e0129a86e98d78f2da9b7cd8445fd85d95b258f8
MD5 68b02e82bca440e59f1dc9c41cb18159
BLAKE2b-256 06884301aadb3d82447a00bc6a41c9d7801d2f6c271e68c7aef1045e9f3a69a1

See more details on using hashes here.

File details

Details for the file marimo_md_export-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: marimo_md_export-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for marimo_md_export-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea4334db83322d76d9dcbc947f7c26085375cba06ecc757cff99fcfad597c33
MD5 6bd3ad48e54a16592c229127420fcbe1
BLAKE2b-256 06fae068d7c9ff71d217fcb52890bbd2ce71351daec0a1cbf68703289c88ca32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page