Skip to main content

Welcome to sketchpy

Intro to the project and some quick information,followed by an image of the project.

Description

This is the beginning level python project to do some awesome drawing animation using the turtle module, hope it grows in the future It is a Python module for animating drawings of images. The sketchpy module is created on top of the turtle module in Python. To install sketchpy on your computer, you can go to your command prompt (command line) and run the following command.

Usage

  • Just install the package pip install sketchpy
  • Import it to you project import sketchpy and use as you want😊

Built with

  • Turtle
  • Open-cv
  • Pillow
  • numpy
  • Svgpathtools

Getting started

Prerequisites

  • Python
  • Basic text editor
  • creativity😂

Install

    pip install sketchpy

it should probably work, If not then try the following code

    pip install turtle open-cv wheel sketchpy

Example

Open your code editor and write the example Python code snippets given below. Run your code and see the magic by yourself.

Drawing Robert Downey Jr. Using Python

    from sketchpy import library as lib
    obj = lib.rdj()
    obj.draw()

OUTPUT

Drawing Tom Holland Using Python

    from sketchpy import library
    myObject = library.tom_holland()
    myObject.draw()

OUTPUT

More examples

    from sketchpy import library as lib

    obj = lib.bts()
    obj.draw()
    from sketchpy import library as lib

    obj = lib.vijay()
    obj.draw()

Drawing Iron Man ASCII Animation Using Python

    from sketchpy import library
    myObject = library.ironman_ascii()
    myObject.draw()

OUTPUT

Drawing from SVG file

Use the following code to draw a file from svg file, insted of tracing full image

NOTE: use this specific website to convert image to svg, sketchpy is specifically made to work with this website only

    from sketchpy import canvas
    obj = canvas.sketch_from_svg('FILE PATH')
    obj.draw()

Saving a loaded svg file

Insted of waiting for the svg file to load, you can save as .npy file and use that for future use

    from sketchpy import canvas
    obj = canvas.sketch_from_svg('FILE PATH')
    obj.load_svg(filename = 'data.npy')

Drawing form .npy file

use the following code to draw your image from saved data file

    from sketchpy import canvas
    obj = canvas.sketch_from_svg('FILE PATH')
    obj.draw(filename = 'data.npy')

Drawing from raw image

use the following code to draw any image, it need not to be an svg file

    from sketchpy import canvas
    obj = canvas.sketch_from_image('IMAGE PATH')
    obj.draw(threshold = 127)

NOTE: you can change the value of threshold to draw more detailed image, it's range is 0 - 255,use values between 90-190

Troubleshooting

  • If you find any problem, you can pull request, or contact me on either insta or discord
  • You can also find video on my youtube channel

Acknowledgements

Thanks to all who helped inspire this project.❤

See also

Consider supporting me

  • upi id sriramanand23@okicici
  • scan and encourage us to develop more features
  • even one rupee make a huge difference

gpay qr code

License

This project is licensed under the MIT License.

Metadata

Release files for sketchpy 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sketchpy 0.1.7
File Size Uploaded
sketchpy-0.1.7.tar.gz 42.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sketchpy 0.1.7
File Interpreter ABI Platform
sketchpy-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 81.5 kB

Release files / sketchpy-0.1.7.tar.gz

Download URL sketchpy-0.1.7.tar.gz
Size 42.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fb4f3516f60d1a25192b90ddc06d52dc2d373b39bf05934999f76b1bff470416
BLAKE2b-256 checksum
How to use checksums
4c16ad4ca3119d8ccfc97c8fb150568cf7ebc68a256594bd297bd1801bd36604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.6

Release files / sketchpy-0.1.7-py3-none-any.whl

Download URL sketchpy-0.1.7-py3-none-any.whl
Size 39.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bda789e682257fc1964d5d3865e8c2d6123f1f075e9ad56cb11471b94a39cdc
BLAKE2b-256 checksum
How to use checksums
ddd0bb6187441ad1b76975701559d27f229483b9afcc686dbbebadb152e395da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.0

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

1 release file

0.0.24

1 release file

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page