Metadata-Version: 2.4
Name: jupyter-book-marimo
Version: 0.0.1
Summary: Render marimo cells as hydrated islands in Jupyter Book.
Keywords: jupyter-book,marimo,myst,notebooks,widgets
Author: Péter Ferenc Gyarmati
Author-email: Péter Ferenc Gyarmati <dev.petergy@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Jupyter
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Requires-Dist: marimo>=0.23.8
Requires-Dist: uv
Requires-Python: >=3.10
Project-URL: Documentation, https://marimo-team.github.io/jupyter-book-marimo/
Project-URL: Repository, https://github.com/marimo-team/jupyter-book-marimo
Project-URL: Issues, https://github.com/marimo-team/jupyter-book-marimo/issues
Description-Content-Type: text/markdown

# marimo + Jupyter Book

marimo is a reactive Python notebook that can be embedded in static documents. This repo
is a Jupyter Book executable plugin that lets you write marimo cells in MyST pages and
publish a static book whose controls, tables, plots, SQL results, and dependent cells
still respond in the browser.

Requires Python 3.10+. The package installs marimo for page execution.

## Quick Start

**1.** Install the plugin in the same environment as Jupyter Book:

```bash
pip install jupyter-book-marimo
```

For uv-managed projects, use:

```bash
uv add jupyter-book-marimo
```

**2.** Register the executable plugin in `myst.yml`:

```yaml
project:
  plugins:
    - type: executable
      path: .venv/bin/jupyter-book-marimo
```

Use the executable path that matches your environment. In this repo's docs site, the
docs live in `docs/`, so the path is `../.venv/bin/jupyter-book-marimo`.

**3.** Edit a MyST page:

````markdown
---
title: My reactive page
---

# A reactive page

```{marimo} python
import marimo as mo

slider = mo.ui.slider(start=1, stop=10, step=1, label="items")
slider
```

```{marimo} python
mo.md(f"The slider is set to **{slider.value}**.")
```
````

Set page defaults or page-local dependencies with `{marimo-config}`:

````markdown
```{marimo-config}
:echo: true
:pyproject: |
  requires-python = ">=3.10"
  dependencies = ["pandas"]
```
````

**4.** Build the book:

```bash
jupyter-book build --html
```

## Features

`jupyter-book-marimo` uses
[marimo islands](https://docs.marimo.io/guides/exporting/#islands-in-action) so reactive
notebook content can live between ordinary book sections. The plugin supports Python,
SQL, and Markdown cells, page-level execution defaults, page-local dependencies, custom
styling hooks, and static HTML output that hydrates into interactive marimo components
on load.

## Docs

Read the user docs at
[marimo-team.github.io/jupyter-book-marimo](https://marimo-team.github.io/jupyter-book-marimo/).

For the full local development workflow, see [CONTRIBUTING.md](CONTRIBUTING.md).
