Skip to main content

Extension to display transient_display_data in Jupyter Lab

Project description

npm version Anaconda-Server Badge

transient-display-data for Jupyter Lab

This is a JupyterLab extension that allows JupyterLab to receive messages in a new transient_display_data type and display them in the console window of the associted notebook.

As summarized here, the transient display data messages are designed to send messages that are transient in nature and will not be displayed and saved with the notebooks. Such messages include but not limited to status or progress information for long calculations, and debug information. This message type is identical to display_data in content so you only need to use message type transient_display_data instead of display_data to mark the message as transient.

This new message type is currently under review. However, even before it is officially accepted, kernels can send messages of this type safely because all Jupyter clients ignore messages of unknown types, and JupyterLab with this extension will be able to display them. An an example, the SoS Kernel uses this message type to send progress information during the execution of the SoS workflows.

How to install

  • If you are using conda version of JupyterLab, you can install this extension with command
    conda install jupyterlab-transient-display-data -c conda-forge
    
  • Otherwise you can install the transient-display-data extension using command
    jupyter labextension install transient-display-data
    
    or go to the extension manager, search for transient-display-data, and install.

How to use transient_display_data

After you installed this extention, you can test it by

  1. Create a notebook with Python 3 kernel
  2. Right click and select New Console for Notebook to create a console window
  3. Right click on the console window and you select Show Transient Message.
  4. In the Python notebook, enter
kernel = get_ipython().kernel
kernel.send_response(kernel.iopub_socket,
                     'transient_display_data',
                     {
                         'data': {
                             'text/plain': 'I am transient'
                         }
                     }
                    );

and a message I am transient should be displayed in the console window.

  1. If you are interested in trying SoS Notebook, you can click this link to start a JupyterLab session on our live server. You can create a new notebook with SoS kernel, open a console window, and execute for example a trivial workflow
%run
[1]
[2]
[3]

You can see progress messages in the console window.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transient_display_data-0.4.4.tar.gz (221.1 kB view details)

Uploaded Source

Built Distribution

transient_display_data-0.4.4-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file transient_display_data-0.4.4.tar.gz.

File metadata

  • Download URL: transient_display_data-0.4.4.tar.gz
  • Upload date:
  • Size: 221.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for transient_display_data-0.4.4.tar.gz
Algorithm Hash digest
SHA256 cb9dc673c66cb5ef6d79039e0e261cea3737a06a9e918d5781e1be85d7075f7f
MD5 48acef11e2c8e92ad49c9ddcc6116239
BLAKE2b-256 2f8ee6259376f56054042c89e9bb1653f058d8136fde4d5bcf41bd0c0c45ae56

See more details on using hashes here.

File details

Details for the file transient_display_data-0.4.4-py3-none-any.whl.

File metadata

File hashes

Hashes for transient_display_data-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b523bbf405107a569614e62c4571e0aa6e813aa02e5777c6e5d8b89259910644
MD5 05383e39d431e7719dc65b799831dfb2
BLAKE2b-256 3b6d0695d1fa2307412bcfca192d959e7dd99e4becbe97c554e9d322f893f006

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page