SVG drawing library
Project description
svg.py
Python library to generate SVG files.
Features:
- Compatible with all SVG standards: 1.1, 1.2, 2.0, Tiny.
- 100% type safe.
- Pure Python.
- No third-party runtime dependencies.
- No deprecated attributes, only what actually works.
- The same names and structure as in the standard. If you know how to write SVG files, you know how to use this library.
Based on svg-xsd-schema and MDN reference.
Installation
python3 -m pip install --user svg.py
Usage
import svg
canvas = svg.SVG(
width=60,
height=60,
elements=[
svg.Circle(
cx=30, cy=30, r=20,
stroke="red",
fill="white",
stroke_width=5,
),
],
)
print(canvas)
See examples for more.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
svg.py-1.3.0.tar.gz
(38.3 kB
view details)
Built Distribution
svg.py-1.3.0-py3-none-any.whl
(11.9 kB
view details)
File details
Details for the file svg.py-1.3.0.tar.gz
.
File metadata
- Download URL: svg.py-1.3.0.tar.gz
- Upload date:
- Size: 38.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fee6434b8f5961904a7b72bd069a19c2c08762eb4d96a560b60ee5c89128a4b9 |
|
MD5 | 69e534245d057fd5546b51ccfe15cac9 |
|
BLAKE2b-256 | 9b475c6ceb2995976d9737beef629eb03d141a356856859e1c2bac4f1b467217 |
File details
Details for the file svg.py-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: svg.py-1.3.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30a3b1d46ef6f6f3780d50753294d8e6531864aed13aa009194ca8c836e41f79 |
|
MD5 | 21e1f25a1ec60e8b3cad3bd47576bd36 |
|
BLAKE2b-256 | f48b9165dfb01f8bb21a36bcb0eddf4d53d8fede344fa3ba59fdf8000addc97a |