Parse & Serialize
Easily parse SVG files into a structured object model and serialize them back to SVG format.
Manipulate
Create, edit, and delete elements and attributes programmatically.
Optimize & Minify
Optimize SVG files by removing extraneous whitespace, lowering precision of floating-point numbers, and other techniques to reduce file size while preserving visual fidelity.
Robust Typing & Runtime Validation
svglab leverages Python's type hints to provide a rich development experience with static type checking. Runtime type validation with Pydantic ensures your data is always valid.
Configurable Formatting
Customize the output format of your SVG files with configurable indentation, attribute ordering, floating-point precision and 20+ other options.