Introduction
Drawioedit is a simple interface to edit drawio files. It uses N2G functions and adds some features.
Features
- Drawioedit has following features:
load embedded drawio from png files
set styles of shapes and links
all of the N2G drawio features
Installation
Install drawioedit by running:
pip3 install drawioedit
Examples
Set the fillcolor of a shape or a link
import sys
sys.path.insert(0, "../")
from drawioedit import DrawIOEdit
import os
red='#ff0000'
base_path=os.path.dirname(os.path.realpath(__file__))
drawing=DrawIOEdit(file_path=f'{base_path}/input.drawio.svg')
drawing.set_shape_color('DC1-SW1',red)
drawing.set_shape_color('bbnew-1',red)
drawing.set_shape_color('iperf-1',red)
drawing.set_shape_color('iperf-3',red)
for link in drawing.find_link_between_nodes('DC1-SW1','bbnew-1'):
link.attrib['style']=drawing._edit_style(link.attrib['style'],'strokeColor',red)
for link in drawing.find_link_between_nodes('Backbone-1','BB-new'):
link.attrib['style']=drawing._edit_style(link.attrib['style'],'strokeColor',red)
print(f'saving {base_path}/output.drawio.png')
drawing.save(f'{base_path}/output.drawio.png')
print(f'saving {base_path}/output.drawio.svg')
drawing.save(f'{base_path}/output.drawio.svg')
print(f'saving {base_path}/output.drawio.jpg')
drawing.save(f'{base_path}/output.drawio.jpg')
print(f'saving {base_path}/output.drawio')
drawing.save(f'{base_path}/output.drawio')
Contribute
Issue Tracker: https://github.com/jinjamator/drawioedit/issues
Source Code: https://github.com/jinjamator/drawioedit
Roadmap
- Selected Roadmap items:
add class documentation
For documentation please refer to https://drawioedit.readthedocs.io/en/latest/
License
This project is licensed under the Apache License Version 2.0
Metadata
Release files for drawioedit 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| drawioedit-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for drawioedit-0.4.3-py3-none-any.whl |
Release files / drawioedit-0.4.3-py3-none-any.whl
| Download URL | drawioedit-0.4.3-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ceed282df004edde40e69dac3690cd59ce016236f9a1034c07090b9ed3193fc
|
|
BLAKE2b-256 checksum How to use checksums |
810e524f11e287c326d7e75d02031302e550d1927f620f5d4e8ee966d78d1f20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for drawioedit 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.