Skip to main content

AnyWidget wrapper for D2 diagrams

Project description

d2-widget

Installation

pip install d2-widget

or with uv:

uv add d2-widget

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

The widget front-end code bundles it's JavaScript dependencies. After setting up Python, make sure to install these dependencies locally:

npm install

While developing, you can run the following in a separate terminal to automatically rebuild JavaScript as you make changes:

npm run dev

Open example.ipynb in JupyterLab, VS Code, or your favorite editor to start developing. Changes made in js/ 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

d2_widget-0.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

d2_widget-0.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file d2_widget-0.0.0.tar.gz.

File metadata

  • Download URL: d2_widget-0.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for d2_widget-0.0.0.tar.gz
Algorithm Hash digest
SHA256 efd2fe699b951811dfbce2a45b0be8bda2343dcba601c4e6b6148965184f3d5e
MD5 ec948091e6f7f39e40df84346c7f0bc3
BLAKE2b-256 802398a8a824953e0df41d3bc420ed5972873bad78d09eee30eb648dab61cc94

See more details on using hashes here.

File details

Details for the file d2_widget-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: d2_widget-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for d2_widget-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18647d33ebe26b674b86b3d81aa368145e1e572f9d4e9318d81e38232e35048e
MD5 14a24865abc2cd2bd6b2a18b75d49456
BLAKE2b-256 073e92904fed466c99988aac41ce010d3f594b36a0cb9e0075357e5effb51e95

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