Create Dynamic SVGs using Python3
Project description
PySVG
The Python library for generating dynamic SVGs using Python3
Version: 0.0.5
Installation
pip install python-svg
Note: This library is still under development
Example:
import svg
from svg.canvas import Canvas
from svg.shapes import Rectangle
from svg.server import svg_server
canvas = Canvas(500, 500)
rect1 = Rectangle(200, 100, canvas)
svg_server(canvas=canvas, port=8000)
To Access the raw SVG in a form of a string
from svg.canvas import Canvas
from svg.shapes import Rectangle
from svg.server import svg_server
canvas = Canvas(500, 500)
rect1 = Rectangle(200, 100, canvas)
svg_code = canvas.svg_content()
print(svg_code)
The browser will redirect you to localhost:port and you can see the SVG ouput!
There will be a RestAPI Version for the same library soon ;)
By KrishnaKanth1729
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python_svg-0.1.1.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for python_svg-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5141062bf2d48aa7c8932a9ebaa16aaa8473e0af765b2c2c69893cb4ba5c9e3a |
|
MD5 | a13294632b9671fc64662d48162a0d4d |
|
BLAKE2b-256 | 6d9275b7057208de3d256acde85648f4e5206e85aabe8eea2fc2b9bbd2bd5284 |