vl-convert-python
Convert Vega-Lite chart specifications to SVG, PNG, or Vega
What it is and what it does
vl-convert-python is a Python wrapper around a Rust library that converts Vega-Lite visualization specifications into static images (SVG or PNG) or into lower-level Vega specifications. It runs Vega-Lite and Vega JavaScript libraries inside a v8 runtime, then handles font metrics and SVG-to-PNG conversion. The package is self-contained—it needs no external web browser, Node.js, or system dependencies beyond what the wheels provide.
You can use it to export charts from Altair (which generates Vega-Lite JSON) or from raw Vega-Lite specifications. The main functions convert a specification string and optional parameters like scale for PNG resolution or vl_version to target a specific Vega-Lite schema version.
Use it for:
- Export Altair charts to PNG or SVG for embedding in reports, dashboards, or web pages without a live rendering engine
- Convert Vega-Lite JSON specifications to static images in batch processing or server-side workflows
- Generate chart images programmatically for automated document generation or email delivery
- Inspect the low-level Vega specification that Vega-Lite compiles to for debugging or further manipulation
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts Vega-Lite chart specifications to static SVG or PNG images, or to Vega specifications, with no external dependencies.
Yes, if you need to export Vega-Lite or Altair charts to static images without a browser or Node.js dependency. The package is dependency-free at runtime, has no known vulnerabilities, and works on common platforms. Install friction is moderate due to compiled wheels, but pre-built binaries are available. Maintenance is aging (205 days since last release, minimal repository activity), so expect slower response to issues, but the core functionality is stable.
Install
vl-convert-python on PyPI
pip
pip install vl-convert-pythonuv
uv add vl-convert-pythonpoetry
poetry add vl-convert-pythonInstalling vl-convert-python
Before you install
Medium install friction due to compiled Rust bindings; wheels are available for common platforms (macOS x86_64 and ARM, Linux x86_64 and ARM64, Windows x64). Last release was 205 days ago; repository shows minimal activity (1 star, aging maintenance status).
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute this package freely in commercial and private projects provided you include the license notice.
Quickstart
pip install vl-convert-python
import vl_convert
vl_spec = '{"$schema": "https://vega.github.io/schema/vega-lite/v5.json", "mark": "circle"}'
svg_str = vl_convert.vegalite_to_svg(vl_spec=vl_spec)
png_data = vl_convert.vegalite_to_png(vl_spec=vl_spec)
Requires Python >=3.7; compiled wheels available for macOS (x86_64, ARM64), Linux (x86_64, ARM64), and Windows (x64) — other platforms may require building from source.
Verify before relying
- Performance characteristics (conversion speed, memory usage) for large or complex charts
- Supported Vega-Lite schema versions and any known compatibility limits
- Quality and fidelity of PNG output at different scale factors
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 205 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,389,181/month — #3,969 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: vl_convert_python-1.9.0.post1-cp37-abi3-macosx_10_12_x86_64.whl; vl_convert_python-1.9.0.post1-cp37-abi3-macosx_11_0_arm64.whl; vl_convert_python-1.9.0.post1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; vl_convert_python-1.9.0.post1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; vl_convert_python-1.9.0.post1-cp37-abi3-win_amd64.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
vegafusionVegaFusion provides Rust-backed tools for…
permissive · top 15,000 on PyPI
vega-datasetsProvides offline and online access to Vega…
permissive · top 15,000 on PyPI
dvc-renderRenders data in DVC plots format into Vega…
permissive · top 5,000 on PyPI
resvg_pyConverts SVG documents to raster image bytes…
unclear · top 5,000 on PyPI
quickchart.ioGenerates static chart images by encoding…
permissive · top 15,000 on PyPI
altexAltex wraps Altair to provide a simple,…
permissive · top 15,000 on PyPI
leatherLeather is a lightweight Python charting…
permissive · top 1,000 on PyPI
CairoSVGCairoSVG converts SVG files to PDF, EPS, PS,…
copyleft · top 5,000 on PyPI