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/warning 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.6.0.tar.gz (201.8 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.6.0-cp39-abi3-win_amd64.whl (4.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

rpiclang-0.6.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.6.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.6.0.tar.gz.

File metadata

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

File hashes

Hashes for rpiclang-0.6.0.tar.gz
Algorithm Hash digest
SHA256 5a70dc29f00c2752ad8c116fb29956bd37ddbe940537d3465b0c38034c989b90
MD5 4420ebcdf28eaf34646515f7c109f0a7
BLAKE2b-256 5c9e43c60d80271d57151b2cb25f5d5eb8c76dfeb06ebd67f4329b7aa5cb0e3a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rpiclang-0.6.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.6.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9eb0e44416f50fa34668d3d94af212d2b67914aad7d3a21324f85c5f002eafae
MD5 2550cc6037a6764d0d91e1207bcaead8
BLAKE2b-256 96e061cc78e8a17f1bc8d527edbb6ed5586cf22e61d0a2be44806dbef9ec9f16

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rpiclang-0.6.0-cp39-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 8172e450370a83457db4d242dbcbb414e904f58cab95ee2c031c511725eaee22
MD5 198b1b9e0f1386e9a134636b8c54c80b
BLAKE2b-256 fe6b61b60c80cf082471b828ccd848c5d972c0376692e3097033b38ace2b8905

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rpiclang-0.6.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e3ab05010c6be2ae74ffbd629dd5d8b39d16a5201319aa57b6581c8daa464ce
MD5 e28a3691d38b79215edf096c8df0da89
BLAKE2b-256 9e919832d92cc54bdb9d1d62a3eb85dde2ffbe72270afd8312d13382c703839a

See more details on using hashes here.

Provenance

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