svg.py


Namesvg.py JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/orsinium-labs/svg
SummarySVG drawing library
upload_time2024-09-23 07:34:04
maintainerNone
docs_urlNone
authorGram
requires_python>=3.7
licenseMIT
keywords svg drawing vector
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # svg.py

Python library to generate SVG files.

Features:

+ Compatible with all SVG standards: 1.1, 1.2, 2.0, Tiny.
+ 100% type safe.
+ Pure Python.
+ No third-party runtime dependencies.
+ No deprecated attributes, only what actually works.
+ The same names and structure as in the standard. If you know how to write SVG files, you know how to use this library.

Based on [svg-xsd-schema](https://github.com/dumistoklus/svg-xsd-schema/blob/master/svg.xsd) and [MDN reference](https://developer.mozilla.org/en-US/docs/Web/SVG).

## Installation

```bash
python3 -m pip install --user svg.py
```

## Usage

**Try svg.py online:** [svg.orsinium.dev](https://svg.orsinium.dev/).

```python
import svg
canvas = svg.SVG(
    width=60,
    height=60,
    elements=[
        svg.Circle(
            cx=30, cy=30, r=20,
            stroke="red",
            fill="white",
            stroke_width=5,
        ),
    ],
)
print(canvas)
```

See [examples](./examples/) for more.

## Projects using svg.py

The github topic [svg-py](https://github.com/topics/svg-py) contains some of the projects that use svg.py in one way or another. If you want your project to appear on the list, simply add `svg-py` into the list of project topics. [Here is how][add-topic].

[add-topic]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics#adding-topics-to-your-repository


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/orsinium-labs/svg",
    "name": "svg.py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "svg, drawing, vector",
    "author": "Gram",
    "author_email": "gram@orsinium.dev",
    "download_url": "https://files.pythonhosted.org/packages/b9/6d/4680d284924d66082b39e7508b70346a8132c06a4bac497ef4d2c05430ec/svg_py-1.5.0.tar.gz",
    "platform": null,
    "description": "# svg.py\n\nPython library to generate SVG files.\n\nFeatures:\n\n+ Compatible with all SVG standards: 1.1, 1.2, 2.0, Tiny.\n+ 100% type safe.\n+ Pure Python.\n+ No third-party runtime dependencies.\n+ No deprecated attributes, only what actually works.\n+ The same names and structure as in the standard. If you know how to write SVG files, you know how to use this library.\n\nBased on [svg-xsd-schema](https://github.com/dumistoklus/svg-xsd-schema/blob/master/svg.xsd) and [MDN reference](https://developer.mozilla.org/en-US/docs/Web/SVG).\n\n## Installation\n\n```bash\npython3 -m pip install --user svg.py\n```\n\n## Usage\n\n**Try svg.py online:** [svg.orsinium.dev](https://svg.orsinium.dev/).\n\n```python\nimport svg\ncanvas = svg.SVG(\n    width=60,\n    height=60,\n    elements=[\n        svg.Circle(\n            cx=30, cy=30, r=20,\n            stroke=\"red\",\n            fill=\"white\",\n            stroke_width=5,\n        ),\n    ],\n)\nprint(canvas)\n```\n\nSee [examples](./examples/) for more.\n\n## Projects using svg.py\n\nThe github topic [svg-py](https://github.com/topics/svg-py) contains some of the projects that use svg.py in one way or another. If you want your project to appear on the list, simply add `svg-py` into the list of project topics. [Here is how][add-topic].\n\n[add-topic]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics#adding-topics-to-your-repository\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "SVG drawing library",
    "version": "1.5.0",
    "project_urls": {
        "Homepage": "https://github.com/orsinium-labs/svg"
    },
    "split_keywords": [
        "svg",
        " drawing",
        " vector"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "512ba541bed029de9ac6a558d3eeeeb0fff5046687651e61d38df3dc43f48e2a",
                "md5": "995a72a4c950a52c15bf5f657bd16499",
                "sha256": "5c467efd5a43e8df4dd6f6d078063f195a04966721d36c43d62f5d7529f908d1"
            },
            "downloads": -1,
            "filename": "svg_py-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "995a72a4c950a52c15bf5f657bd16499",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 13443,
            "upload_time": "2024-09-23T07:34:03",
            "upload_time_iso_8601": "2024-09-23T07:34:03.319983Z",
            "url": "https://files.pythonhosted.org/packages/51/2b/a541bed029de9ac6a558d3eeeeb0fff5046687651e61d38df3dc43f48e2a/svg_py-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b96d4680d284924d66082b39e7508b70346a8132c06a4bac497ef4d2c05430ec",
                "md5": "7af90ced4934f375cd3122bb01021c66",
                "sha256": "a036d0118176c2498601fab33b9b68dd9754e6a5fa12e4d36cce071b307b5c11"
            },
            "downloads": -1,
            "filename": "svg_py-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7af90ced4934f375cd3122bb01021c66",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 40710,
            "upload_time": "2024-09-23T07:34:04",
            "upload_time_iso_8601": "2024-09-23T07:34:04.893818Z",
            "url": "https://files.pythonhosted.org/packages/b9/6d/4680d284924d66082b39e7508b70346a8132c06a4bac497ef4d2c05430ec/svg_py-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-23 07:34:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "orsinium-labs",
    "github_project": "svg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "svg.py"
}
        
Elapsed time: 0.72221s