svgpathtools
A collection of tools for manipulating and analyzing SVG Path objects and Bezier curves.
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
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 · maintenance · safety
MIT (permissive) — MIT license (permissive) allows use in commercial and private projects with minimal restrictions; attribution required.
last release 2025-11-30 (257 days) · last repo commit 2025-11-30 · 636 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 828,505 downloads/mo, #4,954 on PyPI
Alternatives
Verify before relying
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())- 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.
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 on this page. Verify before relying on it.
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
svgpathtools on PyPI
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 the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesnumpysvgwritescipy |
| Maintenance | Aging 257 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 828,505 / month, #4,954 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: Graphics :: Editors :: Vector-BasedTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Image RecognitionTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: MathematicsTopic :: Scientific/Engineering :: VisualizationTopic :: Software Development :: Libraries :: Python Modules |
Evidence: svgpathtools-1.7.2-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “svg path manipulation”
- svgpathtoolsReads, writes, and analyzes SVG Path objects and Bézier curves,…
- svg.pathParses SVG path definitions and provides objects to manipulate path…
- svgelementssvgelements parses SVG files and provides geometric objects (Path,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also svg.path · svgelements · pyclothoids · svgwrite · shapely · drawsvg · napari-svg · gpxpy · svglib · gdstk