resvg_py
What it is and what it does
resvg_py is a Python binding for the resvg SVG rendering library, written in Rust. It takes SVG documents as strings and converts them to raster image bytes. The package requires Python 3.10 or higher and provides a straightforward API: pass an SVG string to svg_to_bytes() and receive rendered image data. It has no runtime dependencies beyond the compiled resvg engine bundled in the wheel.
The package is designed for developers who need to programmatically render SVG to raster images in Python without managing external rendering tools. It exposes most of resvg's capabilities through a high-level interface, making it suitable for both simple conversions and more complex use cases via its full API.
Use it for:
- Convert dynamically generated SVG graphics to image bytes for web display or storage.
- Batch-render SVG documents to images as part of a document processing pipeline.
- Generate raster thumbnails or previews from vector graphics in a Python application.
- Embed SVG-to-image conversion in a headless service or API endpoint.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts SVG documents to raster image bytes using the resvg rendering engine through a high-level Python interface.
Yes, if you need SVG-to-raster conversion in Python and can work with Python 3.10 or higher. The package is actively maintained, has no external runtime dependencies, and offers prebuilt wheels for most platforms. The main caveat is that the license is not declared in metadata—verify it aligns with your project before production use.
Install
resvg-py on PyPI
pip
pip install resvg-pyuv
uv add resvg-pypoetry
poetry add resvg-pyInstalling resvg_py
Before you install
Medium install friction due to compiled wheels, but prebuilt binaries are available for many platforms and Python versions. Actively maintained with recent releases.
Quickstart
pip install resvg_py
import resvg_py
svg_string = "<svg></svg>"
print(resvg_py.svg_to_bytes(svg_string=svg_string))
Requires Python 3.10 or higher
Verify before relying
- Exact license terms are not declared in package metadata—verify licensing before production use.
- Whether the package handles complex SVG features (filters, animations, text rendering) or only basic shapes.
- Performance characteristics and memory usage for large or batch SVG conversions.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 872,750/month — #4,843 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: resvg_py-0.4.0-cp310-abi3-android_24_arm64_v8a.whl; resvg_py-0.4.0-cp310-abi3-android_24_x86_64.whl; resvg_py-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl; resvg_py-0.4.0-cp310-abi3-macosx_11_0_arm64.whl; resvg_py-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; resvg_py-0.4.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; resvg_py-0.4.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; resvg_py-0.4.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl; resvg_py-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; resvg_py-0.4.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl; resvg_py-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl; resvg_py-0.4.0-cp310-abi3-musllinux_1_2_armv7l.whl; resvg_py-0.4.0-cp310-abi3-musllinux_1_2_i686.whl; resvg_py-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl; resvg_py-0.4.0-cp310-abi3-win32.whl; resvg_py-0.4.0-cp310-abi3-win_amd64.whl; resvg_py-0.4.0-cp310-abi3-win_arm64.whl; resvg_py-0.4.0-cp314-cp314t-macosx_10_12_x86_64.whl; resvg_py-0.4.0-cp314-cp314t-macosx_11_0_arm64.whl; resvg_py-0.4.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
vtracerConverts raster images (JPG, PNG) into vector…
permissive · top 15,000 on PyPI
CairoSVGCairoSVG converts SVG files to PDF, EPS, PS,…
copyleft · top 5,000 on PyPI
py_svg_hushSanitizes SVG files by removing malicious…
unclear · top 15,000 on PyPI
vl-convert-pythonConverts Vega-Lite chart specifications to…
permissive · top 5,000 on PyPI
typstCompiles Typst markup documents to PDF, PNG,…
unclear · top 15,000 on PyPI
drawsvgProgrammatically generate SVG images and…
permissive · top 5,000 on PyPI
svglibSvglib reads SVG files and converts them to…
copyleft · top 5,000 on PyPI
pdf417genEncodes text and binary data into PDF417 2D…
permissive · top 15,000 on PyPI
pictexPicTex generates high-quality PNG, JPEG, WebP,…
permissive · top 15,000 on PyPI
dash-svgProvides SVG component primitives (Svg, G,…
permissive · top 15,000 on PyPI