skillfed

svg.py

SVG drawing library

svg-py v1.10.0 93.9K downloads/30d#13,360 on PyPI395
Permissive license MIT AGING released

What it is and what it does

svg.py is a Python library for generating SVG files through a programmatic API. It provides type-safe, Pythonic bindings to SVG elements and attributes that follow the same names and structure as the SVG standard itself, so developers familiar with SVG markup can use the library intuitively. The library supports SVG standards 1.1, 1.2, 2.0, and Tiny, and includes only attributes that actually work—no deprecated features.

You construct SVG documents by instantiating element classes (Circle, Rectangle, Path, etc.) with their attributes, nest them into an SVG container, and print or serialize the result. With zero runtime dependencies and pure Python implementation, it installs and runs with minimal friction. The trade-off is that maintenance has slowed: the last release was 229 days ago, so you should verify that any SVG features you need are already supported.

Use it for:

  • Generate diagrams, charts, or graphs programmatically for web applications or reports.
  • Create vector graphics in data visualization pipelines without learning SVG markup syntax.
  • Build design tools or editors that emit SVG output from user input or algorithmic generation.
  • Produce scalable icons or illustrations as part of an automated build or content pipeline.
  • Test or validate SVG rendering by generating test fixtures with known structure.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates SVG files programmatically in Python using a type-safe API that mirrors the SVG standard structure, with no external runtime dependencies.

Yes, if you need straightforward SVG generation and can tolerate aging maintenance. The library is stable (Production/Stable status), has no dependencies, and covers the SVG standard well. However, verify that your target SVG features are already implemented, since the last release was 229 days ago and there is no recent development activity. Not recommended if you need active bug fixes or cutting-edge SVG feature support.

Install

svg-py on PyPI

pip

pip install svg-py

uv

uv add svg-py

poetry

poetry add svg-py

Installing svg.py

Before you install

Low friction: pure Python wheel with no runtime dependencies. Maintenance signal is aging—last release was 229 days ago and the repository shows no recent activity, though it remains archived=false with 395 stars.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

pip install svg.py

import svg
canvas = svg.SVG(
    width=60, height=60,
    elements=[svg.Circle(cx=30, cy=30, r=20, stroke="red", fill="white")]
)
print(canvas)

Verify before relying

  • Whether the aging maintenance status (229 days since last release) affects real-world usability for current SVG standards.
  • Performance characteristics when generating large or complex SVG documents.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 229 days since the last release
Last repo commit
First released
Downloads 93,919/month — #13,360 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: svg_py-1.10.0-py3-none-any.whl

Keywords: svg, drawing, vector

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonTopic :: Software Development

Tags

svg generation pythonprogrammatic svg drawingsvg builder libraryvector graphics pythonsvg creation apitype-safe svgsvg standard python
svg-generationtype-safe

More Software Development packages