Create excalidraw drawings with python
Project description
Excalidraw_Interface
A pythonic interface for creating diagrams in Excalidraw.
Based on https://github.com/BardOfCodes/procXD by Aditya Ganeshan (MIT License) and updated with modern python support and API improvements.
Example: Flowchart
from Excalidraw_Interface import SketchBuilder
flowchart_items = ['First Step', 'Second Step', 'Third Step']
sb = SketchBuilder() # Create a Sketch
prev_item = sb.TextBox("Start Here", x = 0, y = 0) # Create a Text Box
for index, item in enumerate(flowchart_items):
new_item = sb.TextBox(item, x = 0, y = (index+1) * 150) # Create a Text Box
sb.create_binding_arrows(prev_item, new_item) # Create arrows between boxes
prev_item = new_item
hcb = sb.HeaderContentBox("Header", "Content", x = -200, y = 400) # Create a multiline text box
circle = sb.Ellipse(200, 400, width=50, height=50, backgroundColor = 'red',
roughness=1) # Create a red circle in hand drawn style
sb.create_binding_arrows(prev_item, hcb, sb.DoubleArrow) # Create a double headed arrow
sb.create_binding_arrows(prev_item, circle, strokeColor = 'blue') # Create an blue arrow
sb.export_to_file('out.excalidraw')
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
excalidraw_interface-0.0.1.tar.gz
(396.7 kB
view details)
Built Distribution
File details
Details for the file excalidraw_interface-0.0.1.tar.gz
.
File metadata
- Download URL: excalidraw_interface-0.0.1.tar.gz
- Upload date:
- Size: 396.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25c706d980531c15694cb2520414c16313d9adaabab03ade9bc4dc56e66933b7 |
|
MD5 | 0682cd6b2de03d75f78494cda273082f |
|
BLAKE2b-256 | 4111c05abe8d99d12b1cf321d432642a1e5128dafb10c5e0922afc8568be6966 |
File details
Details for the file Excalidraw_Interface-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: Excalidraw_Interface-0.0.1-py3-none-any.whl
- Upload date:
- Size: 397.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a91d46af4190d8e31df69046836adb41b7add79b9afc78c23f917bcb57fb00b1 |
|
MD5 | 2882b9c5201e363d3c8bd8100006ddb9 |
|
BLAKE2b-256 | 82ab2feb165e331e2d4ccf29cb85baa3d2138613cea50aa87c19bf2f0df0468c |