{"id":16649141,"url":"https://github.com/epeios-q37/tortoise-python","last_synced_at":"2025-04-09T16:52:13.957Z","repository":{"id":57476702,"uuid":"200204147","full_name":"epeios-q37/tortoise-python","owner":"epeios-q37","description":"Turtle graphics on the web in Python.","archived":false,"fork":false,"pushed_at":"2022-07-10T10:48:47.000Z","size":85,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T18:54:23.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epeios-q37.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["epeios-q37"]}},"created_at":"2019-08-02T09:11:34.000Z","updated_at":"2025-02-11T02:36:43.000Z","dependencies_parsed_at":"2022-09-14T12:30:30.888Z","dependency_job_id":null,"html_url":"https://github.com/epeios-q37/tortoise-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Ftortoise-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Ftortoise-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Ftortoise-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Ftortoise-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epeios-q37","download_url":"https://codeload.github.com/epeios-q37/tortoise-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247623008,"owners_count":20968574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T09:07:26.323Z","updated_at":"2025-04-09T16:52:13.940Z","avatar_url":"https://github.com/epeios-q37.png","language":"Python","readme":"\n# Tortoise: [turtle graphics](https://q37.info/s/3dwhcdfm) on the web\n\n[![Run on Repl.it](https://q37.info/s/kpm7xhfm.png)](https://q37.info/s/p3cvfxdx) [![About online demonstrations](https://img.shields.io/badge/about-online%20demonstrations-informational)](https://q37.info/s/sssznrb4)\n\n[![license: MIT](https://img.shields.io/github/license/epeios-q37/tortoise-python?color=yellow\u0026style=for-the-badge)](https://github.com/epeios-q37/tortoise-python/blob/master/LICENSE) [![Version](https://img.shields.io/pypi/v/tortoise?style=for-the-badge\u0026color=90b4ed\u0026label=PyPi)](http://q37.info/s/k3c3fmvp)\n\n\n[![tortoise library example](https://q37.info/s/frgzbhq9)](http://q37.info/s/dj9b7ksf)\n\nThis repository is the [proof of concept](https://q37.info/s/hzpbtv7r) of an implementation, in *Python*, of [turtle graphics](https://q37.info/s/3dwhcdfm) based on web technologies. This is the main difference with the *turtle* module, which uses *(t|T)kinter*.\n\nCloning the repository (or retrieving the corresponding ZIP file) is sufficient to use this module. The `main.py` file, with which above picture were generated, is an example of use of this library. Simply launch `python main.py` from the root of the repository.\n\nThe module is also available on *Pypi*: \u003chttps://pypi.org/project/tortoise/\u003e. Simply launch `pip install tortoise` to install it.\n\nAlternatively, you can also use [*Repl.it*](https://q37.info/s/mxmgq3qm), so you have nothing to install on your computer. Follow this [link](https://q37.info/s/p3cvfxdx), click on the green `run` button, and then click on (or scan) the then displayed [QR code](https://q37.info/s/3pktvrj7).\n\nThis *Python* module is part of a [larger project](https://q37.info/s/tpkx4cfk) that aims to provide a way to write modern examples or exercises for programming tutorials.\n\nThe *tortoise* library currently provides following methods (coordinates and distances are relative to the *viewbox* of the SVG):\n\n- *constructor*`(dom,id)`: returns a *tortoise* object which uses `dom` as the *DOM* from the [*Atlas* toolkit](https://q37.info/s/c7hfkzvs), and the SVG element of id `id`,\n- `getAngle()`: returns the current angel, in degrees,\n- `up()`: puts the pen up,\n- `down()`: puts the pen down,\n- `setAutoDraw(value)`: the drawing is automatically rendered each `value` movements (`0` will disable the auto draw); call `draw()` to render remaining movements,\n- `setPosition(x,y)`: the turtle jumps to position `x` and `y`,\n- `forward(distance)`: the tortoise moves by the specified `distance`,\n- `right(angle)`: the tortoise turns clockwise from `angle` degrees,\n- `left(angle)`: the tortoise turns *counter* clockwise from `angle` degrees,\n- `setColorRGB(r,g,b)`: sets the color of the pen following the RGB color model,\n- `setColorHSL(h,s,l)`: sets the color of the pen following the HSL color model, (`h`: 0 - 360; `s`, `l`: 0 - 100%),\n- `draw()`: draws remaining movements,\n- `clear()`: erase the drawing area and also resets the internal settings (coordinates, angle, color…).\n","funding_links":["https://github.com/sponsors/epeios-q37"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepeios-q37%2Ftortoise-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepeios-q37%2Ftortoise-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepeios-q37%2Ftortoise-python/lists"}