Skip to main content

jupyterlab_advanced_paste_content_extension

GitHub Actions npm version PyPI version Total PyPI downloads JupyterLab 4 Brought To You By KOLOMOLO Donate PayPal

Paste a screenshot or a file into JupyterLab and have it land as a real file. The extension intercepts the paste, writes the payload into the folder you are working in, and gives the surface that received the paste a reference to that file instead of a blob of inline content. A plain-text paste is left alone.

A screenshot pasted into a markdown cell becomes a PNG on disk plus an image link. A copied file becomes a copy in the current folder. Text stays text.

A terminal has no document to give the file a home, so a paste into one becomes a clipping: the file is written into a clippings folder of its own and the shell receives its absolute path.

Features

  • Screenshots become files - a pasted bitmap is written as PNG named paste-20260920-191530.png in the folder holding the document, instead of a base64 blob inside the notebook
  • Pasted files are copied in - a file copied from a file manager lands in the current folder under its own name; several files at once all arrive
  • The reference suits the surface - ![](name) in a markdown file or markdown cell, "name" in a code cell so it drops into plt.imread(), the bare name in a text file
  • Rich HTML becomes markdown - only on the two surfaces that render it; a text file, a code cell and a terminal take the plain-text flavour, which is what a normal paste already gives them
  • A terminal gets a clipping - a file or image pasted into a terminal is written into the clippings folder, /tmp/paste-clippings by default, and the terminal receives the absolute path to it, escaped for the shell, so it resolves wherever the shell has changed into; Claude Code and the other AI assistant terminals included
  • Nothing is written twice - an identical payload references the file already in the folder, and a name clash never overwrites
  • Server-side write - the file is created through a Jupyter server endpoint, so it lands in the server's workspace rather than the browser sandbox, and writes cannot escape the server root

The full behaviour of every content type on every surface is in docs/design-content-types.md.

Configuration

The clippings folder is where a paste into a terminal writes. It defaults to /tmp/paste-clippings and is set in jupyter_server_config.py:

c.PasteClippingsConfig.clippings_dir = "/srv/clippings"

A clipping is treated like clipboard content and is not expected to survive a reboot, which is why the default sits in the temporary directory. To keep them, put the folder anywhere and point the default name at it:

mkdir -p ~/.cache/paste-clippings
ln -s ~/.cache/paste-clippings /tmp/paste-clippings

The symlink is followed, so clips land in the folder under your home directory and outlive the temporary directory being cleared.

When the configured folder cannot be created, or resolves to one this server does not own, the paste is written into the folder the file browser shows instead. A paste never fails because of the clippings folder.

Requirements

  • JupyterLab >= 4.0.0

Install

To install the extension, execute:

pip install jupyterlab_advanced_paste_content_extension

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab_advanced_paste_content_extension

Metadata

Release files for jupyterlab-advanced-paste-content-extension 1.0.7

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

Source distribution (sdist)

Source distribution for jupyterlab-advanced-paste-content-extension 1.0.7
File Size Uploaded
jupyterlab_advanced_paste_content_extension-1.0.7.tar.gz 235.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-advanced-paste-content-extension 1.0.7
File Interpreter ABI Platform
jupyterlab_advanced_paste_content_extension-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 290.1 kB

Release files / jupyterlab_advanced_paste_content_extension-1.0.7.tar.gz

Download URL jupyterlab_advanced_paste_content_extension-1.0.7.tar.gz
Size 235.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5f375ff9b712a1a778798a1a1944139fddcc0b3306269b671f5043dccc40efed
BLAKE2b-256 checksum
How to use checksums
f9a735a2ee06d200471504a06d498bdd77a15f7125c6c001fd15fc319d765f60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / jupyterlab_advanced_paste_content_extension-1.0.7-py3-none-any.whl

Download URL jupyterlab_advanced_paste_content_extension-1.0.7-py3-none-any.whl
Size 54.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62c0a682c7e0bf8e49b4d28196669fbdec3f5143cf3b907cb5787cb463a9be40
BLAKE2b-256 checksum
How to use checksums
1942a7089222ea4304d90a75e5adf544fe2941c37a8caee2c23e2789df6e25f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.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