Skip to main content

Python bindings for rpic — the pic graphics language → SVG/PNG/PDF with animation.

Project description

rpiclang (Python)

Python bindings for rpic — the pic graphics language rendered to SVG / PNG / PDF, with animation manifests.

pip install rpiclang        # distribution name; you `import rpic`
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/diagnostic manifest:
bundle = json.loads(rpic.compile_json('box\nanimate last box with "pop"'))
# bundle["diagnostics"] contains lines emitted by pic `print`

Build

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpiclang-0.5.0.tar.gz (192.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rpiclang-0.5.0-cp39-abi3-win_amd64.whl (4.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

rpiclang-0.5.0-cp39-abi3-manylinux_2_35_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.35+ x86-64

rpiclang-0.5.0-cp39-abi3-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file rpiclang-0.5.0.tar.gz.

File metadata

  • Download URL: rpiclang-0.5.0.tar.gz
  • Upload date:
  • Size: 192.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rpiclang-0.5.0.tar.gz
Algorithm Hash digest
SHA256 88f5ae6d139f23eb58daf712b2a3db3e5a62a067ae0fe546dd04437198912779
MD5 ea4ad3115a107484fb6186836cd386c3
BLAKE2b-256 129fc15685695656dda4958f7098b7a2816854a05e189b4b21f92c4234948b7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpiclang-0.5.0.tar.gz:

Publisher: python.yml on milkway/rpic-lang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rpiclang-0.5.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: rpiclang-0.5.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.9 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rpiclang-0.5.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 28d6a3fde9b6cd3ffe57d2695572dbce583c294d2fcf07b71407d82b9241fb0b
MD5 3efba30a427447d3dc1a3f7639c51799
BLAKE2b-256 421e72d8a1bac5761f802966c54269db1b4c87644c6b3c99d5ac1099b23819cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpiclang-0.5.0-cp39-abi3-win_amd64.whl:

Publisher: python.yml on milkway/rpic-lang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rpiclang-0.5.0-cp39-abi3-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for rpiclang-0.5.0-cp39-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 7a37da0139ff97fea95d10ff61d5452eb39a8a2a5ef4f38b08696ac41ae0dda7
MD5 ea82f917068989d1a0ca7df740fdff95
BLAKE2b-256 502299c76cc26181c81f893cab97058aaadc776641321d8df4e3b9621bac998a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpiclang-0.5.0-cp39-abi3-manylinux_2_35_x86_64.whl:

Publisher: python.yml on milkway/rpic-lang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rpiclang-0.5.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rpiclang-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bde34914ea700d6188bfb07d5d2a5bebbc8158ca3f6922eaef76b83dabad87e0
MD5 0a37ab0bda405fb93ae753ecbebffa84
BLAKE2b-256 a99c33858f85e3e87b41c99bc18c0f618ea939c3fd883220626b4980b7000b87

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpiclang-0.5.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: python.yml on milkway/rpic-lang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page