Draw.io Diagrams as Jupyter Widgets
Project description
IPyDrawio
Drawio diagrams for JupyterLab. Forked with ❤️ from QuantStack/jupyterlab-drawio.
Install · History · Roadmap · Contribute · Open Source ·
This is ALPHA 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
- Edit multi-page documents
- with nearly the same UI and features as diagrams.net
- in many file formats
- Drawio/mxgraph XML, SVG, PNG
- or Jupyter Notebooks
- Jupyter rich display output
- Jupyter Widgets
- Edit multi-page documents
ipydrawio-export
- Export print-quality PDF from diagrams
-
BEWARE: some heavy, maybe fragile dependencies
- include editable Drawio metadata
-
- Export print-quality PDF from diagrams
Examples
Note | Screenshot/Example |
---|---|
A Binder demo with a full contributing environment | |
Screenshot of drawio "minimal" UI with export options | |
The beginning of an interactive computational poster | |
A mixed computational/creative roadmap for this project | ~~Screenshot Needed~ |
Usage
- Try on
- or follow the Installation instructions and Start JupyterLab
- 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
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 and ultimately
puppeteer
which in turn requires 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.
- if running in
nodejs>10,<14
fromconda
or your system package manager- NOTE: this relies on being able to install
puppeteer
(and other arbitrary dependencies withjlpm
for now when first used- we'll figure out a better approach soon enough
- NOTE: this relies on being able to install
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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ipydrawio-1.0.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f8d8dff55f06344b081086d065e35a95d483cae6a9a661542831fce13bea58b |
|
MD5 | 87bad87dd0809ef481ebe8264acbfc3a |
|
BLAKE2b-256 | 750def6b60de10444290d149a21b965d3829d7706ff76e4aefbb7b6262cb9640 |