Skip to main content

Jupyter Tldraw

PyPI version

A tldraw whiteboard as a Jupyter widget, built with anywidget.

image

Install & run

uv run --with jupyterlab --with tldraw jupyter lab

Examples

Three example notebooks are included:

Notebook Widget What it shows
basic.ipynb TldrawWidget A plain tldraw canvas embedded in a cell.
monkey.ipynb MonkeyWidget A 🐒 emoji on the canvas; its x / y are synced as traitlets, so you can .observe(...) the position from Python.
stroke.ipynb StrokeWidget Captures the currently-drawn freehand stroke as a [[x, y], ...] list in Python via the stroke traitlet.

Minimal usage:

from tldraw import TldrawWidget
t = TldrawWidget()
t

Developer setup

  1. Clone the repo
  2. npm i
  3. uv sync
  4. npm run dev (esbuild watches js/*.jsx and rebuilds bundles into src/tldraw/static/)
  5. uv run jupyter lab

Hot module reload

Put this at the top of any dev notebook, before importing the widget:

%env ANYWIDGET_HMR=1
%load_ext autoreload
%autoreload 2

ANYWIDGET_HMR=1 makes anywidget watch the _esm / _css files; %autoreload 2 does the same on the Python side. Combined with npm run dev, edits to js/*.jsx swap into the running widget without re-running the cell.

anywidget reads ANYWIDGET_HMR at import time — if you forgot to set it first, restart the kernel once.

In marimo

Metadata

Release files for tldraw 5.1.1

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

Source distribution (sdist)

Source distribution for tldraw 5.1.1
File Size Uploaded
tldraw-5.1.1.tar.gz 1.8 MB Details

Built distribution (wheel)

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

Total release size: 3.6 MB

Release files / tldraw-5.1.1.tar.gz

Download URL tldraw-5.1.1.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
d964142b8bca3b6aed2358338105bacb7e580509764998dee6e1ce5e000643e8
BLAKE2b-256 checksum
How to use checksums
c32446a9d455f49ea187e1acfbe186aa239a067125362de6a312be9ccc2d00a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / tldraw-5.1.1-py3-none-any.whl

Download URL tldraw-5.1.1-py3-none-any.whl
Size 1.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
87a6e20487e19afaac9840bddb10cb22cfc0c37b28b1a4d84b5d6f5ada91f444
BLAKE2b-256 checksum
How to use checksums
7152cc277ed9e873f6ceb6058705e898b614d3427d7e2c3bfbbcf6b0a9f3c9a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

5.1.1 This release

2 release files

5.0.0

2 release files

3.0.0

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.0.21

2 release files

2.0.20

2 release files

2.0.19

2 release files

2.0.18

2 release files

2.0.17

2 release files

2.0.16

2 release files

2.0.15

2 release files

2.0.14

2 release files

2.0.12

2 release files

2.0.11

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

1.0.0

2 release files

0.1.5

2 release files

0.1.4

1 release file

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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