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.1.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.1-cp39-abi3-win_amd64.whl (4.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

rpiclang-0.4.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: rpiclang-0.4.1.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.1.tar.gz
Algorithm Hash digest
SHA256 30710c553092430b121679f51f2e49514a150be03d47b869f60c53710b4f501e
MD5 4c135fb8c3ab4901260851b61e0cfd04
BLAKE2b-256 43cf70ec106c28b18e6f909b3aa54f0a0751e666ea6a923417926bd4eeb0b037

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rpiclang-0.4.1-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.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 520a9b5961b324b6d39b073376bfa983a5af3aa4caa30c832d483e03a2cb896f
MD5 d55af060bbd973fb4ed22aae4f00f181
BLAKE2b-256 18b55e8454050c4a79eb44f18cd891fc7f1ee2342a613953e3c33cb8663e1576

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rpiclang-0.4.1-cp39-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 eaa0ea7a7491da88b062baf0b7bf575b3659ef957d0aaef0ffdbb212d6e616e9
MD5 c19dae78ab9c1487a99a55b98383b0d7
BLAKE2b-256 348604d533b983a7e66af3bf2633e03bb9980898bb7e03d9a79feb1c2a39ade8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rpiclang-0.4.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7bfabfb92704147cd4abc1c7a88185dbe2c16037da0b3cbd785dffd341d51585
MD5 bf66b40e9387fe4211955ddb3844fa7b
BLAKE2b-256 70ae42800a3266cde61a3f4fbbb01ec9da572cbd8f084d32cee49db181a7391c

See more details on using hashes here.

Provenance

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