Skip to main content

Draw.io Diagrams as Jupyter Widgets

Project description

IPyDrawio

binder-badge install from pypi reuse from npm build coverage

Drawio diagrams for JupyterLab. Forked with ❤️ from QuantStack/jupyterlab-drawio.

Install · History · Roadmap · Contribute · Open Source

This is BETA software. Native drawio files created with these tools should work with any other drawio client, but any UI/API is liable to change at any time.

Installation

pip install ipydrawio ipydrawio-export
# TBD: conda install -c conda-forge ipydrawio

Features

  • ipydrawio
  • ipydrawio-export
    • Export print-quality PDF from diagrams
      • BEWARE: some heavy, maybe fragile dependencies

      • optionally include editable Drawio XML as a PDF attachment

Examples

Note Screenshot/Example
Screenshot of drawio "minimal" UI with export options poster-min
The beginning of an interactive computational poster poster
A mixed computational/creative roadmap for this project Screenshot Needed

Usage

  • Try on binder-badge
  • Import a drawio from diagrams.net with the File Manager
    • or create a new Diagram from the Launcher
  • Use the Command Palette to Export Diagram to various formats
    • NOTE: some of the built-in UI features of drawio don't work properly inside an IFrame in JupyterLab, and are difficult to robustly disable: please see Diagram options available in the Command Palette and various Main Menu menus.

Configuring

  • Change the Diagram Theme from the Settings

Use Advanced Settings to modify drawio embedding parameters

PDF: Lab and Server extensions

ipydrawio-export can generate print-quality PDF. This approach relies on a headless browser, powered by @jgraph/draw-image-export2, puppeteer, and nodejs.

  • native dependencies as required to appease puppeteer
    • if running in docker, this can be a bit trial-and-error
    • for more, see the binder and CI.
  • nodejs>10,<14 from conda or your system package manager
    • NOTE: this relies on being able to install puppeteer (and other arbitrary dependencies with jlpm for now when first used
      • we'll figure out a better approach soon enough
  • pip install ipydrawio-export

For example:

conda install -yc conda-forge nodejs=12
pip install ipydrawio-export

Open Source

License

All files herein, unless otherwise noted, are free software licensed under Apache 2.0.

Copyright

The copyright holders of this extension are the contributors to this repository.

Portions of the JupyterLab components are derived from QuantStack/jupyterlab-drawio.

The copyright holders of drawio and drawio-export is jgraph.

The original source code vendored in this package from:

Copyright 2021 ipydrawio contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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

ipydrawio-1.0.1.tar.gz (32.2 MB view details)

Uploaded Source

Built Distribution

ipydrawio-1.0.1-py3-none-any.whl (67.8 MB view details)

Uploaded Python 3

File details

Details for the file ipydrawio-1.0.1.tar.gz.

File metadata

  • Download URL: ipydrawio-1.0.1.tar.gz
  • Upload date:
  • Size: 32.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for ipydrawio-1.0.1.tar.gz
Algorithm Hash digest
SHA256 46562bd0a598c299c1f1bab089f049d0303785af9328065b69096695a77a3926
MD5 314fb523404c0f31fcc93ad99104ac1d
BLAKE2b-256 d1a03c034f4ff5a823b643ede5dba37daa2c7ffccd2c093cff148c46a12bf683

See more details on using hashes here.

Provenance

File details

Details for the file ipydrawio-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ipydrawio-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 67.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for ipydrawio-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e4f81a8254e3f7c1d939f29096e974115c125e145aefb1fb5479a8c6b22e653
MD5 b672fb27599e36ddcf131eb2c790b7a6
BLAKE2b-256 0cd5f19ca83ccca741711dabae0299041afa63a89ed939f0491d21ed8c89f495

See more details on using hashes here.

Provenance

Supported by

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