svgwrite


Namesvgwrite JSON
Version 1.4.3 PyPI version JSON
download
home_pagehttp://github.com/mozman/svgwrite.git
SummaryA Python library to create SVG drawings.
upload_time2022-07-14 14:05:26
maintainer
docs_urlNone
authorManfred Moitzi
requires_python>=3.6
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            svgwrite
========

This package is inactive! No new features will be added, there will
be no change of behavior, just bugfixes will be merged.

Abstract
--------

A Python library to create SVG drawings.

a simple example::

    import svgwrite

    dwg = svgwrite.Drawing('test.svg', profile='tiny')
    dwg.add(dwg.line((0, 0), (10, 0), stroke=svgwrite.rgb(10, 10, 16, '%')))
    dwg.add(dwg.text('Test', insert=(0, 0.2), fill='red'))
    dwg.save()

for more examples see: examples.py

As the name `svgwrite` implies, `svgwrite` creates new SVG drawings, it does not read existing drawings and also does
not import existing drawings, but you can always include other SVG drawings by the <image> entity.

`svgwrite` is a pure Python package and has no external dependencies.

Installation
------------

with pip::

    pip install svgwrite

or from source::

    python setup.py install


Documentation
-------------

http://readthedocs.org/docs/svgwrite/

svgwrite can be found on GitHub.com at:

http://github.com/mozman/svgwrite.git

Contact
-------

svgwrite@mozman.at

NEWS
====

Version 1.4.3 - 2022-07-14
--------------------------

* BUGFIX: `#114 <https://github.com/mozman/svgwrite/pull/114>`_ Polyline validation by @normanrz

Version 1.4.2 - 2022-03-23
--------------------------

* This package is INACTIVE!

  * No new features will be added.
  * There will be no change of behavior.
  * Only bugfixes will be merged.

* Merged some contributions and bugfixes.

Version 1.4.1 - 2021-01-15
--------------------------

* This package is in maintenance mode, no new features will be added, there will
  be no change of behavior, just bugfixes will be merged.
* Merged some contributions and bugfixes.

Version 1.4 - 2020-03-28
------------------------

* Requires Python 3.6
* Removed Python2 support
* Optimized/faster ``svgparser.py`` module by Florian Festi
* Removed batch files to run tests on Windows, use ``pytest`` or ``tox`` instead

Version 1.3.1 - 2019-06-28
--------------------------

* BUGFIX: changed license of module shapes.py to MIT license

Version 1.3.0 - 2019-06-23
--------------------------

* Dropping Python 2 support in v1.4
* NEW: easy stylesheet embedding: `Drawing.embed_stylesheet(content)`, see example `using_fonts.py <https://github.com/mozman/svgwrite/blob/9d509fe1842e519b8d8475f83543a7589b7c1879/examples/using_fonts.py#L21>`_
* NEW: embedded local fonts: `Drawing.embed_font(fontname, filename)`, see example using_fonts.py
* NEW: embedded web fonts: `Drawing.embed_google_web_font(fontname, uri)`, see example using_fonts.py
* NEW: shapes extension by `Christof Hanke <https://www.induhviduals.de/>`_
* NEW: for write(), save() and saveas(), indentation for pretty print is configurable by `Mitar <http://mitar.tnode.com/>`_
* BUGFIX: converted regex strings in tests to raw strings by `tirkarthi <http://tirkarthi.github.io/>`_

Version 1.2.1 - 2018-11-16
--------------------------

* BUGFIX: Python 2 pretty print encoding issue

Version 1.2.0 - 2018-10-27
--------------------------

* NEW: Inkscape extension - support for Inkscape layers
* BUGFIX: compatibility with Python 3.7 by fixing re.split() usage

Version 1.1.12 - 2017-12-27
---------------------------

* BUGFIX: values attribute for element animate, accepts any semicolon separated values

Version 1.1.11 - 2017-05-31
---------------------------

* CHANGED: e.set_markers((sm, mm, em)), accepts None/False values to set markers individually, like just set end
  marker: s.set_markers((None, False, em))
* BUGFIX: text-decoration attribute accepts multiple values like 'underline overline'

Version 1.1.10 - 2017-01-28
---------------------------

* NEW: added `pretty` argument to `Drawing.write`, `Drawing.save` and `Drawing.saveas` to produce easy to read XML
  output, svgwrite reparses the output string with minidom, this reduces the performance because this process requires
  memory and runtime, default value for `pretty` is False.
* Moved repository to GitHub.com: http://github.com/mozman/svgwrite.git

Version 1.1.9 - 2016-10-26
--------------------------

* NEW: added solidColor paint server (only valid in the Tiny 1.2 profile)

Version 1.1.8 - 2016-05-31
--------------------------

* BUGFIX: None checks: 'if value:' -> 'if value is not None:'

Version 1.1.7 - 2016-05-22
--------------------------

* BUGFIX: color accepts percentage values as floats like "rgb(10.2%, 3.78%, 20%)"

Version 1.1.6 - 2014-05-30
--------------------------

* BUGFIX: sign for offset-value wasn't optional

Version 1.1.5 - 2014-03-26
--------------------------

* BUGFIX: xml serialization for CPython 3.4.0

Version 1.1.4 - 2014-03-16
--------------------------

* simplified path parser
* pyparsing as external dependency (by jenselme)

Version 1.1.3 - 2013-10-01
--------------------------

* updated pyparsing for Python 3 to version 2.0.1 (prior version caused memory leaks)
* BUGFIX: utf8 to unicode encoding error for Python 2.7
* Tests for Python 3 require CPython3.3 or newer, using the 'u' prefix.

Version 1.1.2 - 2013-01-08
--------------------------

* prevent setup.py from compiling all modules - error with 'pyparsing_py2.py' and Python3
* BUGFIX: all tests run with CPython3.3

Version 1.1.1 - 2012-08-15
--------------------------

* License changed to MIT License
* tested with CPython2.7, CPython3.2, CPython3.3 and pypy-1.9 on Win7 Pro 32-bit
* BUGFIX: dwg.animateTranform() -> dwg.animateTransform()
* BUGFIX: in examples, replaced width and height params by size parameter
* added examples
* edit docs

Version 1.0.1 - 2012-06-08
--------------------------

* added inline stylesheets
* added examples created by Lawrence Tattrie

Version 1.0.0 - 2012-05-27
--------------------------

* stable
* tested with CPython 2.7, CPython 3.2, pypy-1.8
* added script tag - thx to jmahmood
* docs also available at: http://readthedocs.org/docs/svgwrite

Version 0.2.4 - 2011-12-30
--------------------------

* beta version
* Python 2.7: all strings will be converted by the unicode() function, for strings containing none-ascii-characters use
  prefix ``u""`` or better use ``from __future__ import unicode_literals``, because this is Python 3 compatible.
* tested with CPython 2.7, CPython 3.2, and PyPy 1.7
* BUGFIX: color parsing accepts white spaces in ``rgb()`` like ``rgb(0, 0, 0)``

Version 0.2.3 - 2010-11-13
--------------------------

* beta version
* Python 3.1 support
* splitted examples.py into several files and moved them to the subdir 'examples'

Version 0.2.2 - 2010-11-05
--------------------------

* alpha version
* removed 'attribs' parameter from all constructors
* new elements: Set, Animate, AnimateMotion, AnimateColor, AnimateTransform, all filter elements
* added set_desc(title, desc), set_metadata(xmldata) to BaseElement class
* moved content of interfaces.py to mixins.py, (ITransform -> Transform and so on)

Version 0.2.1 - 2010-10-31
--------------------------

* alpha version
* new elements: Marker, ClipPath, Mask
* paint service: LinearGradient, RadialGradient, Pattern

Version 0.2.0 - 2010-10-24
--------------------------

* alpha version
* validator rewritten as validator2.py
* debug and profile options separated for each drawing object
* important change: create objects with factory functions of the *Drawing* class: drawing.<svg-elementname>(...)
* added mixins for setting stroke and fill properties
* new elements: Hyperlink, Image, TextArea,

Version 0.1.0 - 2010-09-26
--------------------------

* alpha version
* new elements:

    * basic shapes: Line, Rect, Circle, Ellipse, Polyline, Polygon, Path
    * text elements: Text, TSpan, TRef, TextPath
    * container elements: Group, Symbol, SVG, Use, Defs

* for examples see: examples.py



            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/mozman/svgwrite.git",
    "name": "svgwrite",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Manfred Moitzi",
    "author_email": "me@mozman.at",
    "download_url": "https://files.pythonhosted.org/packages/16/c1/263d4e93b543390d86d8eb4fc23d9ce8a8d6efd146f9427364109004fa9b/svgwrite-1.4.3.zip",
    "platform": "OS Independent",
    "description": "svgwrite\n========\n\nThis package is inactive! No new features will be added, there will\nbe no change of behavior, just bugfixes will be merged.\n\nAbstract\n--------\n\nA Python library to create SVG drawings.\n\na simple example::\n\n    import svgwrite\n\n    dwg = svgwrite.Drawing('test.svg', profile='tiny')\n    dwg.add(dwg.line((0, 0), (10, 0), stroke=svgwrite.rgb(10, 10, 16, '%')))\n    dwg.add(dwg.text('Test', insert=(0, 0.2), fill='red'))\n    dwg.save()\n\nfor more examples see: examples.py\n\nAs the name `svgwrite` implies, `svgwrite` creates new SVG drawings, it does not read existing drawings and also does\nnot import existing drawings, but you can always include other SVG drawings by the <image> entity.\n\n`svgwrite` is a pure Python package and has no external dependencies.\n\nInstallation\n------------\n\nwith pip::\n\n    pip install svgwrite\n\nor from source::\n\n    python setup.py install\n\n\nDocumentation\n-------------\n\nhttp://readthedocs.org/docs/svgwrite/\n\nsvgwrite can be found on GitHub.com at:\n\nhttp://github.com/mozman/svgwrite.git\n\nContact\n-------\n\nsvgwrite@mozman.at\n\nNEWS\n====\n\nVersion 1.4.3 - 2022-07-14\n--------------------------\n\n* BUGFIX: `#114 <https://github.com/mozman/svgwrite/pull/114>`_ Polyline validation by @normanrz\n\nVersion 1.4.2 - 2022-03-23\n--------------------------\n\n* This package is INACTIVE!\n\n  * No new features will be added.\n  * There will be no change of behavior.\n  * Only bugfixes will be merged.\n\n* Merged some contributions and bugfixes.\n\nVersion 1.4.1 - 2021-01-15\n--------------------------\n\n* This package is in maintenance mode, no new features will be added, there will\n  be no change of behavior, just bugfixes will be merged.\n* Merged some contributions and bugfixes.\n\nVersion 1.4 - 2020-03-28\n------------------------\n\n* Requires Python 3.6\n* Removed Python2 support\n* Optimized/faster ``svgparser.py`` module by Florian Festi\n* Removed batch files to run tests on Windows, use ``pytest`` or ``tox`` instead\n\nVersion 1.3.1 - 2019-06-28\n--------------------------\n\n* BUGFIX: changed license of module shapes.py to MIT license\n\nVersion 1.3.0 - 2019-06-23\n--------------------------\n\n* Dropping Python 2 support in v1.4\n* NEW: easy stylesheet embedding: `Drawing.embed_stylesheet(content)`, see example `using_fonts.py <https://github.com/mozman/svgwrite/blob/9d509fe1842e519b8d8475f83543a7589b7c1879/examples/using_fonts.py#L21>`_\n* NEW: embedded local fonts: `Drawing.embed_font(fontname, filename)`, see example using_fonts.py\n* NEW: embedded web fonts: `Drawing.embed_google_web_font(fontname, uri)`, see example using_fonts.py\n* NEW: shapes extension by `Christof Hanke <https://www.induhviduals.de/>`_\n* NEW: for write(), save() and saveas(), indentation for pretty print is configurable by `Mitar <http://mitar.tnode.com/>`_\n* BUGFIX: converted regex strings in tests to raw strings by `tirkarthi <http://tirkarthi.github.io/>`_\n\nVersion 1.2.1 - 2018-11-16\n--------------------------\n\n* BUGFIX: Python 2 pretty print encoding issue\n\nVersion 1.2.0 - 2018-10-27\n--------------------------\n\n* NEW: Inkscape extension - support for Inkscape layers\n* BUGFIX: compatibility with Python 3.7 by fixing re.split() usage\n\nVersion 1.1.12 - 2017-12-27\n---------------------------\n\n* BUGFIX: values attribute for element animate, accepts any semicolon separated values\n\nVersion 1.1.11 - 2017-05-31\n---------------------------\n\n* CHANGED: e.set_markers((sm, mm, em)), accepts None/False values to set markers individually, like just set end\n  marker: s.set_markers((None, False, em))\n* BUGFIX: text-decoration attribute accepts multiple values like 'underline overline'\n\nVersion 1.1.10 - 2017-01-28\n---------------------------\n\n* NEW: added `pretty` argument to `Drawing.write`, `Drawing.save` and `Drawing.saveas` to produce easy to read XML\n  output, svgwrite reparses the output string with minidom, this reduces the performance because this process requires\n  memory and runtime, default value for `pretty` is False.\n* Moved repository to GitHub.com: http://github.com/mozman/svgwrite.git\n\nVersion 1.1.9 - 2016-10-26\n--------------------------\n\n* NEW: added solidColor paint server (only valid in the Tiny 1.2 profile)\n\nVersion 1.1.8 - 2016-05-31\n--------------------------\n\n* BUGFIX: None checks: 'if value:' -> 'if value is not None:'\n\nVersion 1.1.7 - 2016-05-22\n--------------------------\n\n* BUGFIX: color accepts percentage values as floats like \"rgb(10.2%, 3.78%, 20%)\"\n\nVersion 1.1.6 - 2014-05-30\n--------------------------\n\n* BUGFIX: sign for offset-value wasn't optional\n\nVersion 1.1.5 - 2014-03-26\n--------------------------\n\n* BUGFIX: xml serialization for CPython 3.4.0\n\nVersion 1.1.4 - 2014-03-16\n--------------------------\n\n* simplified path parser\n* pyparsing as external dependency (by jenselme)\n\nVersion 1.1.3 - 2013-10-01\n--------------------------\n\n* updated pyparsing for Python 3 to version 2.0.1 (prior version caused memory leaks)\n* BUGFIX: utf8 to unicode encoding error for Python 2.7\n* Tests for Python 3 require CPython3.3 or newer, using the 'u' prefix.\n\nVersion 1.1.2 - 2013-01-08\n--------------------------\n\n* prevent setup.py from compiling all modules - error with 'pyparsing_py2.py' and Python3\n* BUGFIX: all tests run with CPython3.3\n\nVersion 1.1.1 - 2012-08-15\n--------------------------\n\n* License changed to MIT License\n* tested with CPython2.7, CPython3.2, CPython3.3 and pypy-1.9 on Win7 Pro 32-bit\n* BUGFIX: dwg.animateTranform() -> dwg.animateTransform()\n* BUGFIX: in examples, replaced width and height params by size parameter\n* added examples\n* edit docs\n\nVersion 1.0.1 - 2012-06-08\n--------------------------\n\n* added inline stylesheets\n* added examples created by Lawrence Tattrie\n\nVersion 1.0.0 - 2012-05-27\n--------------------------\n\n* stable\n* tested with CPython 2.7, CPython 3.2, pypy-1.8\n* added script tag - thx to jmahmood\n* docs also available at: http://readthedocs.org/docs/svgwrite\n\nVersion 0.2.4 - 2011-12-30\n--------------------------\n\n* beta version\n* Python 2.7: all strings will be converted by the unicode() function, for strings containing none-ascii-characters use\n  prefix ``u\"\"`` or better use ``from __future__ import unicode_literals``, because this is Python 3 compatible.\n* tested with CPython 2.7, CPython 3.2, and PyPy 1.7\n* BUGFIX: color parsing accepts white spaces in ``rgb()`` like ``rgb(0, 0, 0)``\n\nVersion 0.2.3 - 2010-11-13\n--------------------------\n\n* beta version\n* Python 3.1 support\n* splitted examples.py into several files and moved them to the subdir 'examples'\n\nVersion 0.2.2 - 2010-11-05\n--------------------------\n\n* alpha version\n* removed 'attribs' parameter from all constructors\n* new elements: Set, Animate, AnimateMotion, AnimateColor, AnimateTransform, all filter elements\n* added set_desc(title, desc), set_metadata(xmldata) to BaseElement class\n* moved content of interfaces.py to mixins.py, (ITransform -> Transform and so on)\n\nVersion 0.2.1 - 2010-10-31\n--------------------------\n\n* alpha version\n* new elements: Marker, ClipPath, Mask\n* paint service: LinearGradient, RadialGradient, Pattern\n\nVersion 0.2.0 - 2010-10-24\n--------------------------\n\n* alpha version\n* validator rewritten as validator2.py\n* debug and profile options separated for each drawing object\n* important change: create objects with factory functions of the *Drawing* class: drawing.<svg-elementname>(...)\n* added mixins for setting stroke and fill properties\n* new elements: Hyperlink, Image, TextArea,\n\nVersion 0.1.0 - 2010-09-26\n--------------------------\n\n* alpha version\n* new elements:\n\n    * basic shapes: Line, Rect, Circle, Ellipse, Polyline, Polygon, Path\n    * text elements: Text, TSpan, TRef, TextPath\n    * container elements: Group, Symbol, SVG, Use, Defs\n\n* for examples see: examples.py\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A Python library to create SVG drawings.",
    "version": "1.4.3",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "d17eafd2ac04c2ecaf607ec9a3a0d709",
                "sha256": "bb6b2b5450f1edbfa597d924f9ac2dd099e625562e492021d7dd614f65f8a22d"
            },
            "downloads": -1,
            "filename": "svgwrite-1.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d17eafd2ac04c2ecaf607ec9a3a0d709",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 67122,
            "upload_time": "2022-07-14T14:05:24",
            "upload_time_iso_8601": "2022-07-14T14:05:24.459057Z",
            "url": "https://files.pythonhosted.org/packages/84/15/640e399579024a6875918839454025bb1d5f850bb70d96a11eabb644d11c/svgwrite-1.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "8e6d536bdffefa03341b77dff5add485",
                "sha256": "a8fbdfd4443302a6619a7f76bc937fc683daf2628d9b737c891ec08b8ce524c3"
            },
            "downloads": -1,
            "filename": "svgwrite-1.4.3.zip",
            "has_sig": false,
            "md5_digest": "8e6d536bdffefa03341b77dff5add485",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 189516,
            "upload_time": "2022-07-14T14:05:26",
            "upload_time_iso_8601": "2022-07-14T14:05:26.107825Z",
            "url": "https://files.pythonhosted.org/packages/16/c1/263d4e93b543390d86d8eb4fc23d9ce8a8d6efd146f9427364109004fa9b/svgwrite-1.4.3.zip",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-07-14 14:05:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "mozman",
    "github_project": "svgwrite.git",
    "lcname": "svgwrite"
}
        
Elapsed time: 0.01878s