Package: ipydrawio
IPyDrawiodemodocsinstallbuildDrawiodiagrams forJupyterLab. Forked with ❤️ fromQuantStack/jupyterlab-drawio.Install·History·Roadmap·Contribute·Open SourceThis is BETA software. Native drawio files created with these toolsshouldwork
with any otherdrawioclient, but any UI/API is liable to change at any time.Installationmambainstall-cconda-forgeipydrawio# recommended, or...condainstall-cconda-forgeipydrawio# or...pipinstallipydrawio[all]Featuresipydrawiofull support for JupyterLabbest-effort support for JupyterLiteⓁ and RetroLabⓡEdit multi-pagedocumentswith nearly the same UI and features asdiagrams.netin many file formatsDrawio/mxgraph XML, SVG, PNGor Jupyter Notebooksⓡwith all the Drawio templatesⓡplus some Jupyter onesJupyterrich displayoutputJupyterWidgetsBasic collaborative editingrequires the--collaborativeflag, added in JupyterLab 3.1+token sharing,a lajupyterlab-link-share, or a custom connector (no known
yet)no presence indicators for other editorsipydrawio-exportExport print-quality PDF from diagramsⓁⓡoptionally include editable Drawio XML as a PDF attachmentBEWARE: someheavy, maybe fragile dependencies,mambarecommendedmambainstall-cconda-forgeipydrawio-export# recommended, or...condainstall-cconda-forgeipydrawio-export# or...pipinstallipydrawioipydrawio-exportipydrawio-mathjaxinclude rich LaTeX and AsciiMath typesetting in diagramsⓡ: unavailable in RetroLab Ⓛ: unavailable in JupyterLiteExamplesNoteScreenshot/ExampleScreenshot of drawio "minimal" UI with export optionsThe beginning of an interactive computationalposterA mixed computational/creativeroadmapfor this projectScreenshot NeededUsagePlease see thedocsfor full informationTry onor follow theInstallation instructionsandStart JupyterLabOpen a diagram, by doing one of:Creating aDiagram_ from theLauncherUploading a diagram created ondiagrams.netwith theFile
Managerand double clicking itBuilding diagrams by interactively computing inIPythonwithipydrawio.DiagramUse theapplication/x-drawioMIME rendererUse theCommand PalettetoExport Diagramto various formatsNOTE: 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 seeDiagramoptions available in theCommand Paletteand variousMain Menumenus.ConfiguringUI ThemesYour default theme can be changed in the JupyterLab Main Menu:openSettingsopenDiagram Themeselect your themeall open documents will change to this theme (prompting if not saved)all future documents will use this themeThe different themes have some advantages and disadvantages:themedefaultfull menulayerspageslightdarkroughatlas✔️✔️✔️✔️dark✔️✔️✔️✔️kennedy✔️✔️✔️✔️min✔️✔️✔️✔️⚙️sketch✔️✔️⚙️✔️Note thatroughwill change how many shapes lookDrawio Configuration and URL parametersUseAdvanced Settingsto modify drawio embedding parametersSee theschemafor full details of the (known) supported options as well as theupstream docsfor all parameters, though IPyDrawio might not support them... yet.PDF: Lab and Server extensionsipydrawio-exportcan generate print-quality PDF. This approach relies on a headless
browser, powered by@jgraph/draw-image-export2,puppeteer, andnodejs.native dependenciesas required to appeasepuppeteerif running indocker, this can be a bit trial-and-errorfor more, see thebinderand CI.nodejs>=18,<19fromcondaor your system package managerNOTE: this relies on being able to installpuppeteer(and otherarbitrary
dependencieswithjlpmfor nowwhen first usedpip install ipydrawio-exportorconda install -c conda-forge ipydrawio-exportFor example to install all the dependencies:condainstall-ycconda-forgeipydrawio-exportipydrawio-mathjaxOptionally, pre-install the dependencies:jupyteripydrawio-exportprovisionBy default this will install to{JUPYTER_DATA_DIR}/ipydrawio_export, but can be
tuned with:the$IPYDRAWIO_DATA_DIRenvironment variableIPyDrawioExportManager.drawio_export_workdirinjupyter_config.jsonAdditionally, the (large) chromium browser download can be tuned with the$IPYDRAWIO_PUPPETEER_CACHE_DIRor$PUPPETEER_CACHE_DIRenvironment variables.Once installed, you can use the in-browser toolsExport Diagram as PDFas well as the
command line:jupyteripydrawio-export<nameofdocument>Open SourceLicenseAll files herein, unless otherwise noted, are free software licensed underApache 2.0.CopyrightThe copyright holders of this extension are thecontributorsto this repository.Portions of the JupyterLab components are derived fromQuantStack/jupyterlab-drawio.The copyright holders of drawio and drawio-export isjgraph.The original source code vendored in this package from:@jgraph/drawio@jgraph/draw-image-export2Copyright 2023 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.