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.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for python_svg-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a12b9bea96dc0104be8c70df84982f53c1be21b005b821d14a43bfb93d6ef27 |
|
MD5 | 7009c9a2d078048ce9b821b2d8834b40 |
|
BLAKE2b-256 | 1719806e4928d283149cf3668b631a7ab368eab4b4c0c95ca7bb470e676ba879 |