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.4.0.tar.gz (192.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.4.0-cp39-abi3-win_amd64.whl (4.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

rpiclang-0.4.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.4.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.4.0.tar.gz.

File metadata

  • Download URL: rpiclang-0.4.0.tar.gz
  • Upload date:
  • Size: 192.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.4.0.tar.gz
Algorithm Hash digest
SHA256 6ba52cd0906bdcbc28996be36bbf1f9fd63bb08127daecd936ecb1959348a211
MD5 3cc3e7f0d6472e4c7b7942151a80883b
BLAKE2b-256 fbb42c19acea20096bb4937c29e9e1824a0e987e3b3cddf9fc64bea5d583ac00

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rpiclang-0.4.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.4.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 78604622a74d84814f4097ac959ae75f3428175c225bc5ba3a001316f2bb1713
MD5 81771e3132e5d9db8bd25fed09919550
BLAKE2b-256 90a03ad04da0149ded6c0bb2d1466d17844a6f84bbd2f4ae562ade94a91e8592

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rpiclang-0.4.0-cp39-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 5fa72792579d4b5931edb9cb12345adabfb65ed088120554be8adc91535a50b5
MD5 68ed7d4075d6bd1b1977bfbce82751fb
BLAKE2b-256 7c04d5eac214c598e4beb791669f56abe1c0888ee7b57f69bd8e041b6f3753ea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rpiclang-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51e2cdb1c54edef9b7a3f9d1dd385557b82ea6cd4bbc177cdd20329f14c337f3
MD5 728fe3cfbb527b50aee782fd53df968d
BLAKE2b-256 c56ed4d6b719ff780f0000b057c9afa257bf159347ff32cc693fb8058fd4202c

See more details on using hashes here.

Provenance

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