Skip to main content

Jupyter drawing utility

Binder

Small utility to make simple drawings in Jupyter notebooks with ipycanvas and ipywidgets. Useful for getting quick user input in research prototypes, e.g., for masking or annotation.

Example usage

Install

pip install ipycanvas-drawing

Usage

Create a simple drawing interface. Check out the notebook in examples for a more complete example.

from ipycanvas_drawing import DrawingWidget

# Create a drawing widget
# You can set other setup parameters: background, alpha, default_style, default_radius
drawing_widget = DrawingWidget(width=500, height=500) 
# Show the drawing widget
drawing_widget.show()

# Get the image data as a numpy array
image_output = drawing_widget.get_image_data()

Known issues

  • Visual Studio Code's Jupyter environment doesn't like ipycanvas's sync_image_data functionality. Workaround: open notebooks in Jupyter lab or Notebook in the browser.
  • ipycanvas does not work in Google Colab. Workaround: use the Binder to quickly try the tool without needing to install it on your own machine.

Credits

Based on the hand drawing example provided by @martinRenou, but adds some additional functionality like adding squares and ellipses and a 1-step undo.

Metadata

Release files for ipycanvas-drawing 0.0.5

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

Source distribution (sdist)

Source distribution for ipycanvas-drawing 0.0.5
File Size Uploaded Provenance Actions
ipycanvas_drawing-0.0.5.tar.gz 47.3 kB Without provenance Details for ipycanvas_drawing-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ipycanvas-drawing 0.0.5
File Interpreter ABI Platform Actions
ipycanvas_drawing-0.0.5-py3-none-any.whl Python 3 none any Details for ipycanvas_drawing-0.0.5-py3-none-any.whl

Total release size: 52.1 kB

Release files / ipycanvas_drawing-0.0.5.tar.gz

Download URL ipycanvas_drawing-0.0.5.tar.gz
Size 47.3 kB
Tags Source
SHA-256 checksum
How to use checksums
622f145bcee54c7e50f970cba7e63da6b2a42f63eafc9ab6585aa63af90aca22
BLAKE2b-256 checksum
How to use checksums
e54404ce64598f63945f5b180d71e21a38e677fb2987db263b2c04227c383c21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release files / ipycanvas_drawing-0.0.5-py3-none-any.whl

Download URL ipycanvas_drawing-0.0.5-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43ed59c3cc2946d9846fe86b3470ee03e6d1460fdeee9d277783dc324b6824bf
BLAKE2b-256 checksum
How to use checksums
71773e28e0e3d8f2f6fb50c5c901feebabd101265397bacf1788a9d65e58629e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Security for ipycanvas-drawing 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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