Metadata-Version: 2.4
Name: rpiclang
Version: 0.0.2
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics
Classifier: License :: OSI Approved :: BSD License
Summary: Python bindings for rpic — the pic graphics language → SVG/PNG/PDF with animation.
Author-email: André Leite <leite@de.ufpe.br>
License: BSD-2-Clause
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/milkway/rpic-lang
Project-URL: Issues, https://github.com/milkway/rpic-lang/issues
Project-URL: Repository, https://github.com/milkway/rpic-lang

# rpiclang (Python)

Python bindings for [rpic](https://github.com/milkway/rpic-lang) — the pic
graphics language rendered to SVG / PNG / PDF, with animation manifests.

```sh
pip install rpiclang        # distribution name; you `import rpic`
```

```python
import rpic, json

svg = rpic.render_svg('box "hi"; arrow; circle "x"')
open("out.png", "wb").write(rpic.render_png("box \"hi\"", scale=2.0))
open("out.pdf", "wb").write(rpic.render_pdf("box \"hi\""))

# circuit library:
svg = rpic.render_svg('A:(0,0); B:(2,0)\nresistor(A,B)', circuits=True)

# svg + animation manifest:
bundle = json.loads(rpic.compile_json('box\nanimate last box with "pop"'))
```

## Build

```sh
pip install maturin
cd bindings/python
maturin develop --release     # installs into the current environment
# or: maturin build --release  → wheels in target/wheels/
```

