Skip to content

MatthewAndreTaylor/ipysketch_lite

Repository files navigation

ipysketch_lite 🎨

PyPI Docs Jupyterlite

ipysketch_lite is a simple interactive sketching tool for Jupyter notebooks. After drawing a sketch you can use it directly in your Jupyter notebook. When changes are made to the sketch, the image data in Python is updated.

demo

Try it out in JupyterLite: Jupyterlite

Documentation 📖

You can view the documentation at: https://matthewandretaylor.github.io/ipysketch_lite

Install 🛠️

You can install using pip:

pip install ipysketch-lite

Or using piplite if you are using Jupyter lite

import piplite
await piplite.install("ipysketch_lite")

Quickstart 🚀

Start drawing a quick sketch in your notebook like this

from ipysketch_lite import Sketch

sketch = Sketch()

Then add a new cell to retrieve the sketch data in python

sketch.data # Sketch image data as a base64 encoded string
sketch.image # PIL Image of the sketch

example sketch

Sketch data gets updated in cells after the sketch is modified. This means you can edit your sketch and get the new updated outputs