Skip to main content

Generate SVG code on a programmatic way.

Project description

ScalableWriter

SV (ScalableWriter) is a small library which can generate SVG code.

Install

# PIP
pip install ScalableWriter

# GIT+PIP
pip install git+https://github.com/ZSendokame/Scalable.git

Use

import scalable

# Specify output file, it also accepts a width and height arguments.
svg = scalable.SVG("output.html")

# The functions accept every keyword, translating them into SVG.
svg.rectangle(
    x=150, y=60, width=25, height=75,
    fill="red", stroke="black", stroke_width=2
)
svg.ellipse(cx=205, cy=120, rx=43, ry=91, fill="red", stroke="black")
svg.ellipse(cx=210, cy=70, rx=30, ry=15, fill="white", stroke="black")
svg.line(x1=151, y1=62, x2=169, y2=62, stroke="#aa0000", stroke_width=2)

# Save the file.
svg.save()

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

ScalableWriter-1.1.0.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file ScalableWriter-1.1.0.tar.gz.

File metadata

  • Download URL: ScalableWriter-1.1.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for ScalableWriter-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f6ecb22640a20068ae260f285cccb597d2e3e23c656f8b0f897fe9195825d895
MD5 78afd398703786f37064f87c17ec712d
BLAKE2b-256 a6a3538485f30bce252607f461b135528e2393189ae104d014d5b8f93368f1c5

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