ipysketch_lite 🎨#
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.
Start sketching now 🖌️#
You can start sketching now without having to install anything on your computer.
Install 🛠️#
You can install using pip:
pip install ipysketch-lite
Or using piplite if you are using JupyterLite:
import piplite
await piplite.install("ipysketch_lite")
API Reference 📚#
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
Sketch data gets updated in cells after the sketch is modified. This means you can edit your sketch and get the new updated outputs
Using your own drawing API 🖌️#
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.