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.
You can view the documentation at: https://matthewandretaylor.github.io/ipysketch_lite
You can install using pip:
pip install ipysketch-liteOr using piplite if you are using Jupyter lite
import piplite
await piplite.install("ipysketch_lite")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 sketchSketch data gets updated in cells after the sketch is modified. This means you can edit your sketch and get the new updated outputs
You can extend ipysketch_lite to use your own JavaScript drawing library by subclassing Sketch and customizing the frontend template.
See the custom_sketch.ipynb notebook for an example.

