--- id: svgpathtools version: "1.7.2" license: MIT license_treatment: permissive maintenance: aging --- # svgpathtools — A collection of tools for manipulating and analyzing SVG Path objects and Bezier curves. License: permissive · Maintenance: aging · Downloads: 828.5K/mo ## What it is and what it does svgpathtools is a Python library for working with SVG Path elements and Bézier curves at the geometric level. It lets you parse SVG files into Path objects composed of Line, Arc, QuadraticBezier, and CubicBezier segments, then manipulate and analyze them using mathematical operations. You can compute tangents, normals, curvature, arc length, intersections, bounding boxes, and areas; convert between Bézier and polynomial forms; and smooth or split paths. The library depends on numpy for numerical operations, svgwrite for SVG output, and optionally scipy for performance. It's useful for programmatic SVG generation, geometric analysis of vector graphics, and path manipulation tasks that would be tedious to hand-code. Coordinates are represented as complex numbers, making geometric operations natural to express. Use it for: - Parse an SVG file and compute geometric properties (arc length, curvature, bounding boxes) of its paths. - Programmatically generate or modify SVG paths by constructing Path objects and converting them to SVG d-strings. - Find intersections between SVG path segments or detect where paths cross each other. - Smooth kinked paths or break discontinuous paths into continuous subpaths for further processing. - Convert between SVG Bézier curves and polynomial representations for mathematical analysis or visualization. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads, writes, and analyzes SVG Path objects and Bézier curves, providing geometric tools to transform, intersect, and measure path elements. Yes, if you need to work with SVG paths programmatically or perform geometric analysis on vector graphics. The library is stable (MIT, no known vulnerabilities), has low install friction, and supports modern Python. The aging maintenance status is not a blocker—the last commit is recent and the repository is active—but you should verify scipy's necessity for your use case and be aware that some functionality may not be fully tested on discontinuous paths. ## Install pip install svgpathtools uv add svgpathtools poetry add svgpathtools ## Installing svgpathtools Before you install: Low friction install with three runtime dependencies (numpy, svgwrite, scipy). The package is aging but actively maintained—last commit 2025-11-30, repository not archived, and supports current Python versions (3.8–3.13). License in practice: MIT license (permissive) allows use in commercial and private projects with minimal restrictions; attribution required. Quickstart: from svgpathtools import Path, CubicBezier, Line, parse_path seg1 = CubicBezier(300+100j, 100+100j, 200+200j, 200+300j) seg2 = Line(200+300j, 250+350j) path = Path(seg1, seg2) print(path.d()) Verify before relying: - Whether scipy is truly optional or required for core functionality beyond performance optimization. - Extent of testing coverage for discontinuous Path objects (documentation notes some functionality untested on them). - Performance characteristics when handling large or complex SVG files. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 828.5K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags svg path manipulation, bezier curve tools, svg parsing and editing, geometric path analysis, svg to python objects, curve intersection detection, svg path geometry, svg-graphics, bezier-curves, geometry [View on SkillFed](https://skillfed.io/packages/svgpathtools) · [View on PyPI](https://pypi.org/project/svgpathtools/)