Metadata-Version: 2.4
Name: pdraw
Version: 0.0.0
License-File: LICENSE
Summary: Native patent drawing authoring, inspection, rendering, and editing
License-Expression: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# pdraw

Python SDK for native patent drawings, powered by Rust through PyO3.

```python
from pathlib import Path
from pdraw import Document, Slide, Box, create, inspect, replace

document = Document([Slide([Box("device", 100, 100, 140, 60, text="Device 102")])])
result = create(document.to_pdrawml())
Path("figure.pptx").write_bytes(result.package_bytes())
Path("review.png").write_bytes(result.render_png())
current = inspect(result.package_bytes())
updated = replace(result.package_bytes(), current.pdrawml.replace("Device 102", "Device 104"), current.snapshot)
```

`create`, `inspect`, and `replace` accept `format="vsdx"` for Visio.
Results expose `pdrawml`, `snapshot`, `slide_count`, and `warnings`.
`render_png(slide=1, dpi=144)` returns PNG bytes; slide numbers start at one.
Creation and replacement optionally accept an `assets` mapping of names to image bytes.
Invalid input and stale snapshots raise `ValueError`.

Install with `pip install pdraw==0.0.0`. Wheels support CPython 3.10 and later.
Building from source requires Rust and maturin.

