Skip to main content

Jupyter Variable Inspector banner

Jupyter Variable Inspector

The Variable Inspector is a JupyterLab extension designed to help you manage and track variables within your notebook. It displays all your variables in one convenient location, allowing you to see their names, values, types, shapes, and sizes in real-time. This feature makes it easier to work without the need to manually print or check your variables. It is for Python only.

Install the extension using pip by following the instructions below. Variable Inspector is also included with MLJAR Studio.

Features

Display variables

Explore all available variables in the current notebook as a list.

Jupyter Variable Inspector displays variables

Display DataFrames

You can preview the DataFrame values as an interactive table.

Jupyter Variable Inspector display DataFrame

Display DataFrames with updates

The preview of DataFrame will be automatically refreshed when you change it in the Python code.

Jupyter Variable Inspector update data

Customize displayed columns

You can select which properties of the variables you'd like to display:

cols

Automatic or manual refresh

The list of variables will automatically update whenever you execute a cell. However, you can choose the Manual Refresh option to update the list at your convenience.

image

Dark theme

If you prefer a darker look, a Dark Theme is also available!

image

Variable Inspector in MLJAR Studio

Variable Inspector is included with MLJAR Studio, a desktop environment for Python and data analysis built on JupyterLab.

In Studio, you can keep a variable or DataFrame preview open beside a classic notebook or an AI Data Analyst conversational notebook. Open previews automatically update when your Python code changes the data.

No separate extension installation is required.

Download MLJAR Studio

Variable Inspector requirements

  • Python >= 3.9
  • JupyterLab >= 4.2.0

Install extension

To install the extension, execute:

pip install variable_inspector

Uninstall extension

To remove the extension, execute:

pip uninstall variable_inspector

Contributing

Development install

Note: Building from source requires Node.js 22.12.0 or newer for the patched build dependencies. Installing a prebuilt Python wheel does not require Node.js.

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
# Change directory to the variable_inspector directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False

Development uninstall

pip uninstall variable_inspector

In development mode, you will also need to remove the symlink created by jupyter labextension develop command. To find its location, you can run jupyter labextension list to figure out where the labextensions folder is located. Then you can remove the symlink named variable-inspector within that folder.

Running end-to-end UI tests

This project uses Playwright to run UI tests against JupyterLab with the MLJAR extension.

Prerequisites

  • Node.js / Yarn
  • Playwright installed (jlpm playwright install)

How to Run Tests

You need two terminals:

1. Start JupyterLab

In the first terminal, run:

jlpm lab

This will start JupyterLab at http://localhost:8899/lab.

2. Run UI Tests

In the second terminal, run:

jlpm test:ui:headed

This will:

  • Remove any temporary Untitled*.ipynb files
  • Launch Playwright in headed mode (with a visible browser)
  • Run the end-to-end tests defined in tests/e2e
  • Remove leftover Untitled*.ipynb files after tests finish

Notes

  • Logs are printed to the console during test execution for easier debugging.
  • If you encounter navigation timeout errors, make sure JupyterLab is fully started before running the tests.

Packaging the extension

See RELEASE

Shared kernel data

The in-memory kernel-data service is included in this extension. Other MLJAR extensions can use it without a separate Python dependency.

Metadata

Release files for variable-inspector 1.4.4

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

Source distribution (sdist)

Source distribution for variable-inspector 1.4.4
File Size Uploaded
variable_inspector-1.4.4.tar.gz 749.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for variable-inspector 1.4.4
File Interpreter ABI Platform
variable_inspector-1.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 843.2 kB

Release files / variable_inspector-1.4.4.tar.gz

Download URL variable_inspector-1.4.4.tar.gz
Size 749.3 kB
Tags Source
SHA-256 checksum
How to use checksums
225407d89660f33c344203e5f7140af92ddc91045d8cbacb7a59f9d103f32f9c
BLAKE2b-256 checksum
How to use checksums
5d17273f528df0dc5a1d77bf0e61c45e4a6da1b8c80856898f419d4d50e98af9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.10

Release files / variable_inspector-1.4.4-py3-none-any.whl

Download URL variable_inspector-1.4.4-py3-none-any.whl
Size 94.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85996c4760ef46837a918353ee644e098f4cbabb5020281cb6ace6acb19172a3
BLAKE2b-256 checksum
How to use checksums
55282aa3f47e4c2eccf4e1b3fd2e97c03e32f4a6368ddb550c27092dc6976aea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.10

Release history Release notifications | RSS feed

This release

1.4.4 This release

2 release files

1.4.0

1 release file

1.3.0

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.1.0

1 release file

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