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.0.9.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for python_svg-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87b08b6fcbb1f95b53a164066f82785a622971fef3bd63c29a30b4886f502f07 |
|
MD5 | ee5ae19560070e8c076fb05f90a06ad6 |
|
BLAKE2b-256 | fa28a08eb07b3ec9f768fd918f4ac7f8e135c302afac6795c371319091eb1a9a |