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.2.0.tar.gz (169.3 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.2.0-cp39-abi3-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9+Windows x86-64

rpiclang-0.2.0-cp39-abi3-manylinux_2_35_x86_64.whl (3.7 MB view details)

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

rpiclang-0.2.0-cp39-abi3-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for rpiclang-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fd730be88e217b5f19a22ae6563be46bb4500254efdcfadf9d8d18d0fb7d2049
MD5 4df8bef6b8747760eb4ab09a9f135281
BLAKE2b-256 dde7dcd5e538319dfe265b02ba4db78ab58e2e1678fa8386d067b546f14ef1a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpiclang-0.2.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.2.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: rpiclang-0.2.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.2 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.2.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 51fa8413194366ed70aa08b136ca33c24544e466f580eb1ff7104f6fabe4ceea
MD5 f54a1b1f6a75c4ab7de2ca3381bd63e4
BLAKE2b-256 addb2b9b895c142791f2bbfbb9a477da632cf96584030dc36755609793645dfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpiclang-0.2.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.2.0-cp39-abi3-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for rpiclang-0.2.0-cp39-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 e9abfadca39c92235be8d8a8f5530b0729334b08770a0e3b56ac502814aaeb4f
MD5 3a8e9ded2d63f22b4e3c39c3cb6cd859
BLAKE2b-256 58bc99681c17ee9e205253dd913aa5c73319724321ea4d9acbee8ce405ed699b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpiclang-0.2.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.2.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rpiclang-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c806938a5fbbfd4d2af3b1026c29aa2362d04de879ca073c3157e8b3d0a7816
MD5 f79c4cb6ea2e17aed364662c4c69d8d0
BLAKE2b-256 bf24040c040e6373b18adfd00d2b6abfe91b56ec1756d7abb5935d90e7df36d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpiclang-0.2.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