Registry / serialization / skia-pathops

skia-pathops

JSON →
library0.9.2pypypi✓ verified 82d ago

skia-pathops is a Python library that provides access to boolean operations on 2D vector paths using Google's Skia graphics library. It's currently at version 0.9.2, seeing relatively frequent updates that often align with upstream Skia library changes or Python version support.

pip install skia-pathops
INSTALL
IMPORT
SIG · SKIA-PATHOPS
S
skia-pathops
serializationpythonv0.9.2
Install
1.7s avg
Import
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.2 · 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.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 29.3MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.7s · import 0.000s · 27MB
26MB installed
● package 26MB
Code
Verified usage

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

Path
from pathops import Path
from skia_pathops import Path

This quickstart demonstrates how to create two simple rectangular paths and perform a union operation using `OpBuilder`. The result is a new `Path` object representing the combined shape.

from skia_pathops import Path, PathOp, OpBuilder # Create two simple paths path1 = Path() path1.moveTo(0, 0) path1.lineTo(100, 0) path1.lineTo(100, 100) path1.lineTo(0, 100) path1.close() path2 = Path() path2.moveTo(50, 50) path2.lineTo(150, 50) path2.lineTo(150, 150) path2.lineTo(50, 150) path2.close() # Perform a union operation builder = OpBuilder() builder.op(path1, path2, PathOp.UNION) union_path = builder.resolve().pop() # resolve returns a list of paths print(f"Original path 1 contour count: {len(path1.getContours())}") print(f"Original path 2 contour count: {len(path2.getContours())}") print(f"Union path contour count: {len(union_path.getContours())}") # You can inspect the points of the resulting path (simplified output) first_contour_points = union_path.getContours()[0].points print(f"First contour points (first 3): {first_contour_points[:3]}")
Debug
Known issues
breakingPython 3.8 and 3.9 support was dropped in `v0.9.0`. Users on these Python versions must either upgrade their Python environment or pin to an older `skia-pathops` version.
fix
Upgrade Python to 3.10 or newer, or `pip install 'skia-pathops<0.9.0'`.
affects: >=0.9.0
breakingPython 3.7 support was dropped in `v0.8.0`. Users on Python 3.7 must upgrade their Python environment or use an older `skia-pathops` version.
fix
Upgrade Python to 3.8 or newer, or `pip install 'skia-pathops<0.8.0'`.
affects: >=0.8.0
gotchaWhen building from source, `skia-pathops` typically bundles and compiles `libskia`. To use a system-installed or externally compiled `libskia` instead, you must set the `BUILD_SKIA_FROM_SOURCE=0` environment variable.
fix
Before `pip install`, set `export BUILD_SKIA_FROM_SOURCE=0` (Linux/macOS) or `$env:BUILD_SKIA_FROM_SOURCE=0` (PowerShell) to disable embedded Skia build.
affects: all
breakingThe `PathPen` interface's `curveTo` and `qCurveTo` methods changed to support a variable number of points, aligning with the fontTools BasePen protocol. This can break custom `Pen` implementations.
fix
Update custom `PathPen` implementations to handle variable arguments for `curveTo` (4 or 6 points) and `qCurveTo` (2 or 4 points) as per the updated BasePen protocol.
affects: >=0.7.4
Upgrade
Version history
0.9.2latest on PyPI · released Feb 16, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Resources
skia-pathops — pip install skia-pathops · libregistry