Skip to main content

No project description provided

Project description

PyPI version License: Apache2.0

mermaid-nb

Create Mermaid diagrams in Python

Installation

pip install mermaid-nb

or with uv:

uv add mermaid-nb

Getting Started

In your notebook, run the following command:

from mermaid_nb import Mermaid

Mermaid(diagram="flowchart LR\n  Hello --> World\n  Hello --> Name")
image

Create a Mermaid diagram in a Jupyter notebook

image

Create a Mermaid diagram in a marimo notebook or a marimo WebAssembly (WASM) notebook

image

Here is a basic example of a marimo WebAssembly (WASM) notebook.

Create a Mermaid diagram in a JupyterLite notebook

image

Here is a basic example of a JupyterLite notebook.

Development

We recommend using uv for development. It will automatically manage virtual environments and dependencies for you.

uv run jupyter lab example.ipynb

Alternatively, create and manage your own virtual environment:

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
jupyter lab example.ipynb

Open example.ipynb in JupyterLab, VS Code, or your favorite editor to start developing. Changes made in src/mermaid_nb/static/ will be reflected in the notebook.

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

mermaid_nb-0.0.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

mermaid_nb-0.0.2-py2.py3-none-any.whl (8.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mermaid_nb-0.0.2.tar.gz.

File metadata

  • Download URL: mermaid_nb-0.0.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for mermaid_nb-0.0.2.tar.gz
Algorithm Hash digest
SHA256 bc063e670a072db0effe2670e9c2de3ef33734018b0bac5998a20f300c785f48
MD5 f66a9d94e584cab794f828550af6728c
BLAKE2b-256 7b8ff07c7c933df0972b8f936634264378d4d2412ed464a5c92ad577cbf520b7

See more details on using hashes here.

File details

Details for the file mermaid_nb-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mermaid_nb-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 390519971a93b3542fcc476adb7137b5aa4d0b41bc8749945bf5b16e44c4cd93
MD5 16bd941a34b9bcb0e07c181051e9ea53
BLAKE2b-256 4a9219d0ef0c118e473b05fb1b470d8f323578bc14b26f5769c0a2ff1c4e4582

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