This release is a pre-release and may not be stable for production use.
py-skia-canvas
Python Canvas drawing with the shared Rust/Skia core from skia-canvas@3.0.8.
The installed wheel runs without Node, npm, Neon/N-API or skia-python.
Install
Use CPython 3.13 on Windows AMD64 or Linux glibc 2.28+ x86_64:
python -m pip install --index-url https://pypi.org/simple/ --only-binary=:all: py-skia-canvas==0.1.0a19
This is an alpha release. Other Python ABIs, macOS, ARM and musl are not part of the accepted wheel matrix. System fonts are used or explicitly registered; the package does not bundle system fonts.
Draw and export
from pathlib import Path
from py_skia_canvas import Canvas
canvas = Canvas(360, 180)
ctx = canvas.getContext("2d")
ctx.fillStyle = "white"
ctx.fillRect(0, 0, 360, 180)
ctx.fillStyle = "#2878d9"
ctx.fillRect(20, 20, 320, 80)
ctx.font = "24px sans-serif"
ctx.fillStyle = "#16243a"
ctx.fillText("Hello Canvas", 20, 145)
Path("hello.png").write_bytes(canvas.toBufferSync("png"))
The API includes paths and boolean operations, transforms, gradients, text measurement/layout, images/pixels, effects/compositing, pages, synchronous and asynchronous exports, and App/Window. Export formats include PNG, JPEG, WebP, raw pixels, SVG and PDF. Public names and defaults follow the pinned Node API; Buffers map to bytes and Promises to actual Python awaitables.
Offscreen drawing uses the original GPU policy and automatically falls back
to CPU when no GPU is available. Explicit CPU selection uses canvas.gpu = False
after construction. App/Window presentation requires a GPU and desktop.
Canvas, Context, font and GPU resources stay on their creating thread; each
worker must create its own drawing objects.
Windows parallel PDF/SVG file sequences retain the upstream nondeterministic
font-subsetting limitation. Explicit RAYON_NUM_THREADS=1 before process start
is the documented workaround; the library's default concurrency is unchanged.
Documentation and ecosystem
- 中文安装与使用
- English documentation
- API reference
- Runnable examples
- Release evidence and known limitations
- py-mermaid targets Mermaid syntax, layout and rendering in Python using this Canvas engine; follow its repository for implementation progress.
MIT licensed; third-party notices and dependency licenses are included in the wheel.
Metadata
Release files for py-skia-canvas 0.1.0a19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_skia_canvas-0.1.0a19-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details for py_skia_canvas-0.1.0a19-cp313-cp313-win_amd64.whl |
| py_skia_canvas-0.1.0a19-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details for py_skia_canvas-0.1.0a19-cp313-cp313-manylinux_2_28_x86_64.whl |
Total release size: 27.1 MB
Release files / py_skia_canvas-0.1.0a19-cp313-cp313-win_amd64.whl
| Download URL | py_skia_canvas-0.1.0a19-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 12.4 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d77dbeeef61b5d41398105cce66a28f513d7c5dc06a1635de745d33e9688f99f
|
|
BLAKE2b-256 checksum How to use checksums |
19c0ba0c3c1506eaac2effc01f7ce458206633ca3e1c9a42530ba8febd57ae45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / py_skia_canvas-0.1.0a19-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | py_skia_canvas-0.1.0a19-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 14.7 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c21dfdb17d8dc50d0e4f490116f21b3b1d7c30e57acf975409197c05ec1d1089
|
|
BLAKE2b-256 checksum How to use checksums |
b2bead41176cc797b7130ae5e62b8f9d11283c2d51d5290af99b8468bd53f3fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for py-skia-canvas 0.1.0a19
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for py_skia_canvas-0.1.0a19-cp313-cp313-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.