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/jupyterlab-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/jupyterlab-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/jupyterlab-paste-clippings
ln -s ~/.cache/jupyterlab-paste-clippings /tmp/jupyterlab-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.6

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.6
File Size Uploaded
jupyterlab_advanced_paste_content_extension-1.0.6.tar.gz 235.2 kB Details

Built distribution (wheel)

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

Total release size: 290.0 kB

Release files / jupyterlab_advanced_paste_content_extension-1.0.6.tar.gz

Download URL jupyterlab_advanced_paste_content_extension-1.0.6.tar.gz
Size 235.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8dea225187ddeaae48d86fe7568ba426c8f27982c8b8dd0b1c80dde70474385b
BLAKE2b-256 checksum
How to use checksums
e85cb934b11aa8a5a11c7a78ed950abbb5f936adc837764b7568b52224ec1f96
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.6-py3-none-any.whl

Download URL jupyterlab_advanced_paste_content_extension-1.0.6-py3-none-any.whl
Size 54.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4a05dfca228839adfbf3de03522bff8c310e408c6ea26220cfce66bd4a199b3
BLAKE2b-256 checksum
How to use checksums
0c1691542f7ada3ae4ef32c128f3a1f529c8df60c36d2d96af1660a226e4fc23
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

1.0.7

2 release files

This release

1.0.6 This release

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