Skip to content

cesaryuan/resvg-py

 
 

Repository files navigation

resvg_py

Downloads CI Documentation Status Pypi Badge

A safe and high level binding for the resvg project

Install

pip install resvg_py

Then use it like this:

import resvg_py

svg_string = """
    <svg width="300" height="130" xmlns="http://www.w3.org/2000/svg">
      <rect width="200" height="100" x="10" y="10" rx="20" ry="20" fill="blue" />
    </svg>
"""

print(resvg_py.svg_to_bytes(svg_string=svg_string))

(if you have a complex use case, please check the api or usage. It mostly re-exposes everything of resvg)

Requires

  • Python 3.10 or higher

This library is feature complete in my opinion.

About

High level wrapper of resvg for python

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 77.5%
  • Python 22.5%