Skip to main content

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 details)

Uploaded Source

Built Distribution

python_svg-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file python_svg-0.1.1.tar.gz.

File metadata

  • Download URL: python_svg-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for python_svg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 186cdd8279910832ea82d6cdf9643aa812eb2d8ff87d4acd0b840e1858c2c931
MD5 c148c55ce65d5e61d6b31f15490e2eab
BLAKE2b-256 9467f92b137a057f87f73f4bead5572666d9138c4ab88ee1e10783553646bc41

See more details on using hashes here.

File details

Details for the file python_svg-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: python_svg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for python_svg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5141062bf2d48aa7c8932a9ebaa16aaa8473e0af765b2c2c69893cb4ba5c9e3a
MD5 a13294632b9671fc64662d48162a0d4d
BLAKE2b-256 6d9275b7057208de3d256acde85648f4e5206e85aabe8eea2fc2b9bbd2bd5284

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page