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

Uploaded CPython 3.9+Windows x86-64

rpiclang-0.3.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.3.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.3.0.tar.gz.

File metadata

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

File hashes

Hashes for rpiclang-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f9b90466bfd8978010c89e60c8f1fa02f8c3281d2e7c43c8f31da9ef81b9fb0c
MD5 0603380b8a9a4e051f305e792c187cb1
BLAKE2b-256 a430ee6483c164fe05c0e16f24950d6d45650e7086e0e3cc659d67e3ec180b77

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rpiclang-0.3.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.3.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 26e474c492e4ecdf517ca21638656a789940be309305a02f59823a8dc89a61ef
MD5 fc735575cc28a7e8adbd0e988b7f9e04
BLAKE2b-256 d476eb8d635203d210b1a9d936c4bbd49ffd3aead5ad4817f9c5093badb96060

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rpiclang-0.3.0-cp39-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 c078cca4a8c937cd95bd9015a2752a43c10100aff01ff36843997d675f30c68d
MD5 1ec9859f3c18e0e4e9f4e38c92bdcd05
BLAKE2b-256 1be2ecc26c00b26a425663ebb93273a94172d94f17474729906fcd547aed6983

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rpiclang-0.3.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 43b136e0ad383dbcefb0aa0cc8184399c936f4bc51bc8ab04392c9e925b29e84
MD5 82eb9afbf42c96624c4c5529e526bc43
BLAKE2b-256 3f4cceab483af9bc8f2aad2551d25b57c9bac35548d082c5bcedcaea27fabf15

See more details on using hashes here.

Provenance

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