drawsvg
A Python 3 library for programmatically generating SVG (vector) images and animations. Drawsvg can also render to PNG, MP4, and display your drawings in Jupyter notebook and Jupyter lab.
Decision gist · record as of 2026-08-14
Yes. Low install friction, no dependencies, active maintenance, permissive license, and a solid feature set for SVG generation and Jupyter integration make this a practical choice for anyone generating vector graphics programmatically. The recent release and 694 GitHub stars indicate a stable, used project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Actively maintained with a recent release (2 days ago) and steady repository activity.
License · maintenance · safety
permissive license (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for most projects.
last release 2026-08-12 (2 days) · last repo commit 2026-08-12 · 694 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 895,484 downloads/mo, #4,789 on PyPI
Alternatives
Verify before relying
import drawsvg as draw
d = draw.Drawing(200, 100, origin='center')
d.append(draw.Circle(0, 0, 30, fill='red', stroke='black'))
d.save_svg('example.svg')
d # Display in Jupyter- Whether raster export (PNG, MP4, GIF) requires additional system dependencies beyond the base install
- Current state of the interactive widget in Jupyter Lab (description notes it does not yet work there)
What it is and what it does
drawsvg is a Python library for creating SVG vector graphics and animations through code rather than manual XML editing. It supports most common SVG elements (circles, rectangles, paths, text, arcs, markers) and nearly all SVG attributes via Python keyword arguments. The library integrates directly with Jupyter notebooks for inline display and includes an interactive widget for mouse-driven updates.
The package handles both static drawings and native SVG animations with playback controls, and can export to multiple formats. It has no runtime dependencies, making installation straightforward. The coordinate system defaults to standard SVG conventions (y increases downward), and the API uses snake_case naming throughout.
Use it for
- Generate diagrams, charts, and technical illustrations programmatically within data science notebooks
- Create animated visualizations with SVG-native keyframe animations and playback controls
- Build interactive drawing tools in Jupyter using the DrawingWidget for mouse event handling
- Export vector graphics to PNG or video formats for presentations and reports
- Define reusable drawing patterns with gradients, clip paths, and grouped elements
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no dependencies, active maintenance, permissive license, and a solid feature set for SVG generation and Jupyter integration make this a practical choice for anyone generating vector graphics programmatically. The recent release and 694 GitHub stars indicate a stable, used project.
Install
drawsvg on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained with a recent release (2 days ago) and steady repository activity.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for most projects.
Quickstart
import drawsvg as draw
d = draw.Drawing(200, 100, origin='center')
d.append(draw.Circle(0, 0, 30, fill='red', stroke='black'))
d.save_svg('example.svg')
d # Display in Jupyter
Verify before relying
- Whether raster export (PNG, MP4, GIF) requires additional system dependencies beyond the base install
- Current state of the interactive widget in Jupyter Lab (description notes it does not yet work there)
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 895,484 / month, #4,789 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: IPythonFramework :: JupyterLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 |
Evidence: drawsvg-2.4.2-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 › “programmatic vector graphics”
- drawsvgProgrammatically generate SVG images and animations in Python, with…
- svgwriteCreates SVG drawings programmatically by building XML elements and…
- svg.pyGenerates SVG files programmatically in Python using a type-safe API…
Give your agent the search over MCP, or paste the wish link into any chat.
More Graphics packages
Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.
Install it if you need to work with images in Python—it is the de facto standard for this task.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.
PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.
The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.
pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.
Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.
Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.
See also svg.py · svgwrite · aggdraw · svgelements · svglib · anybadge · dash-svg · ppf-datamatrix · resvg_py · wavedrom