CMD + K

d2-widget

Community

D2, Declarative Diagramming in Python via AnyWidget.

Installation

To install this package, run one of the following:

Conda
$conda install conda-forge::d2-widget

Usage Tracking

0.0.3
1 / 8 versions selected
Downloads (Last 6 months): 0

Description

d2-widget is an AnyWidget for displaying declarative diagrams written in D2.

  • D2 Diagram Rendering: Create and display interactive D2 diagrams directly in Python notebooks
  • Configurability: Support for all D2 compilation options including themes, layouts, and rendering configurations
  • SVG Export: Programmatically access the SVG representation for use in other documents
  • Jupyter Cell Magic: Use the convenient %%d2 cell magic for quick diagram creation
  • Notebook Compatibility: Works in Jupyter, Google Colab, Marimo, and other AnyWidget-enabled Python notebook environments
  • Animation Support: Create animated diagrams with D2's native animation capabilities

About

Summary

D2, Declarative Diagramming in Python via AnyWidget.

Last Updated

Jan 16, 2026 at 11:53

License

MIT

Total Downloads

23

Supported Platforms

noarch