svg-turtle


Namesvg-turtle JSON
Version 0.4.3 PyPI version JSON
download
home_pagehttps://donkirkby.github.io/svg-turtle
SummaryUse the Python turtle to write SVG files.
upload_time2024-10-08 05:51:24
maintainerNone
docs_urlNone
authorDon Kirkby
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SaVaGe Turtle [![Build Badge]][build] [![Coverage Badge]][codecov] [![Downloads Badge]][downloads] [![PyPI Badge]][pypi] [![Supported Python versions]][pypi]
[Supported Python versions]: https://img.shields.io/pypi/pyversions/svg-turtle.svg

### Use the Python turtle to write SVG files

[Build Badge]: https://github.com/donkirkby/svg-turtle/actions/workflows/build.yml/badge.svg?branch=main
[build]: https://github.com/donkirkby/svg-turtle/actions
[Coverage Badge]: https://codecov.io/github/donkirkby/svg-turtle/coverage.svg?branch=main
[codecov]: https://codecov.io/github/donkirkby/svg-turtle?branch=main
[PyPI Badge]: https://badge.fury.io/py/svg-turtle.svg
[pypi]: https://pypi.org/project/svg-turtle/
[Downloads Badge]: https://static.pepy.tech/badge/svg-turtle/month
[downloads]: https://pepy.tech/project/svg-turtle

If you're using the Python turtle module to teach students, or you just like
using the turtle module yourself, this library can save the images from a turtle
script as SVG files. Experiment with your turtle code using the regular turtle
or the [Live Coding in Python] plugin for PyCharm, then pass an `SvgTurtle` to
the same code, and save it as an SVG file. If you want to produce other file
formats, use [svglib] to convert the SVG to PDF, PNG, GIF, JPG, TIFF, and PCT,
among others.

[Live Coding in Python]: https://donkirkby.github.io/live-py-plugin/
[svglib]: https://pypi.org/project/svglib/#examples

## Installing
Install it with `pip install svg_turtle`. If you haven't installed Python
packages before, read Brett Cannon's [quick-and-dirty guide].

[quick-and-dirty guide]: https://snarky.ca/a-quick-and-dirty-guide-on-how-to-install-packages-for-python/

## Drawing
Once it's installed, create an `SvgTurtle`, telling it how big to make the SVG
file. Then give it some turtle commands, and save the file.

    from svg_turtle import SvgTurtle
    
    t = SvgTurtle(500, 500)
    t.forward(200)
    t.dot(10)
    t.save_as('example.svg')

## More Information
If you'd like to help out with the project, see the `CONTRIBUTING.md` file in
the source code.

            

Raw data

            {
    "_id": null,
    "home_page": "https://donkirkby.github.io/svg-turtle",
    "name": "svg-turtle",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Don Kirkby",
    "author_email": "donkirkby@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/28/5a/4ae942460c922b64f12521046ae3dc094ee234c5fec87d5c9d6a0ac0471f/svg_turtle-0.4.3.tar.gz",
    "platform": null,
    "description": "# SaVaGe Turtle [![Build Badge]][build] [![Coverage Badge]][codecov] [![Downloads Badge]][downloads] [![PyPI Badge]][pypi] [![Supported Python versions]][pypi]\n[Supported Python versions]: https://img.shields.io/pypi/pyversions/svg-turtle.svg\n\n### Use the Python turtle to write SVG files\n\n[Build Badge]: https://github.com/donkirkby/svg-turtle/actions/workflows/build.yml/badge.svg?branch=main\n[build]: https://github.com/donkirkby/svg-turtle/actions\n[Coverage Badge]: https://codecov.io/github/donkirkby/svg-turtle/coverage.svg?branch=main\n[codecov]: https://codecov.io/github/donkirkby/svg-turtle?branch=main\n[PyPI Badge]: https://badge.fury.io/py/svg-turtle.svg\n[pypi]: https://pypi.org/project/svg-turtle/\n[Downloads Badge]: https://static.pepy.tech/badge/svg-turtle/month\n[downloads]: https://pepy.tech/project/svg-turtle\n\nIf you're using the Python turtle module to teach students, or you just like\nusing the turtle module yourself, this library can save the images from a turtle\nscript as SVG files. Experiment with your turtle code using the regular turtle\nor the [Live Coding in Python] plugin for PyCharm, then pass an `SvgTurtle` to\nthe same code, and save it as an SVG file. If you want to produce other file\nformats, use [svglib] to convert the SVG to PDF, PNG, GIF, JPG, TIFF, and PCT,\namong others.\n\n[Live Coding in Python]: https://donkirkby.github.io/live-py-plugin/\n[svglib]: https://pypi.org/project/svglib/#examples\n\n## Installing\nInstall it with `pip install svg_turtle`. If you haven't installed Python\npackages before, read Brett Cannon's [quick-and-dirty guide].\n\n[quick-and-dirty guide]: https://snarky.ca/a-quick-and-dirty-guide-on-how-to-install-packages-for-python/\n\n## Drawing\nOnce it's installed, create an `SvgTurtle`, telling it how big to make the SVG\nfile. Then give it some turtle commands, and save the file.\n\n    from svg_turtle import SvgTurtle\n    \n    t = SvgTurtle(500, 500)\n    t.forward(200)\n    t.dot(10)\n    t.save_as('example.svg')\n\n## More Information\nIf you'd like to help out with the project, see the `CONTRIBUTING.md` file in\nthe source code.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Use the Python turtle to write SVG files.",
    "version": "0.4.3",
    "project_urls": {
        "Bug Reports": "https://github.com/donkirkby/svg-turtle/issues",
        "Homepage": "https://donkirkby.github.io/svg-turtle",
        "Source": "https://github.com/donkirkby/svg-turtle"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c72da44f3b800deb69b7d9633582d33d517cd829663ffe59f383391f7f631778",
                "md5": "7fd376a115eb6495c6ee98ab35a77e0d",
                "sha256": "90d38588834f21067afa36febb1a7e6f3277e52162055e683c048e86e2b2b0c7"
            },
            "downloads": -1,
            "filename": "svg_turtle-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7fd376a115eb6495c6ee98ab35a77e0d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12249,
            "upload_time": "2024-10-08T05:51:23",
            "upload_time_iso_8601": "2024-10-08T05:51:23.275623Z",
            "url": "https://files.pythonhosted.org/packages/c7/2d/a44f3b800deb69b7d9633582d33d517cd829663ffe59f383391f7f631778/svg_turtle-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "285a4ae942460c922b64f12521046ae3dc094ee234c5fec87d5c9d6a0ac0471f",
                "md5": "7cd92d4069f6496f56b0405384d76a53",
                "sha256": "939deda3abfc789d8f7090473cbb2cf90719ee71cf5f0005be085c26d1c07f46"
            },
            "downloads": -1,
            "filename": "svg_turtle-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "7cd92d4069f6496f56b0405384d76a53",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15081,
            "upload_time": "2024-10-08T05:51:24",
            "upload_time_iso_8601": "2024-10-08T05:51:24.416911Z",
            "url": "https://files.pythonhosted.org/packages/28/5a/4ae942460c922b64f12521046ae3dc094ee234c5fec87d5c9d6a0ac0471f/svg_turtle-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-08 05:51:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "donkirkby",
    "github_project": "svg-turtle",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "svg-turtle"
}
        
Elapsed time: 1.17429s