Registry / serialization / skia-python

skia-python

JSON →
library144.0.post2pypypi✓ verified 35d ago

Python bindings for the Skia 2D graphics library. Current version is 144.0.post2, released on 2025-04-28. The project tracks upstream Skia milestones (currently m144) and releases irregularly, often with significant API changes between milestones.

serialization
Install & Compatibility
Where this runs
tested against v144.0.post2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.5s · import 0.000s · 119MB
120MB installed
● package 120MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

import skia

Basic example: create a surface, draw a red rectangle, and save as PNG.

import skia import os # Create 256x256 red canvas surface = skia.Surface(256, 256) with surface as canvas: paint = skia.Paint(color=skia.ColorRED, style=skia.Paint.kFill_Style) canvas.drawRect(skia.Rect(10, 10, 100, 100), paint) # Save to PNG image = surface.makeImageSnapshot() image.save('output.png', skia.kPNG) print('Image saved as output.png')
Debug
Known footguns
breakingVulkan APIs now require skia.VkFormat and skia.VkImageLayout enums instead of integer constants. Code using raw Vulkan integer values will break.
breakingskia.ApplyPerspectiveClip removed upstream. Associated APIs take one fewer argument.
breakingskia.PathBuilder.incReserve now takes one more argument (count plus unknown parameter).
gotchaLinux users must have libEGL.so installed (from mesa-libEGL, libglvnd, or Nvidia drivers) or import will fail.
deprecatedskia.PDF.MakeDocument() signature changed: jpegEncoder and jpegDecoder fields are now required in Metadata. The zero-argument skia.PDF.Metadata() now includes default JPEG codecs.
gotchaNumpy dependency is required; missing numpy leads to import errors in pixel operations.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
14 hits · last 30 days
gptbot
4
ahrefsbot
3
claudebot
2
script
1
mj12bot
1
chatgpt-user
1
Resources