Skip to main content

Jupyter interactive widgets

Project description

ipywidgets: Interactive HTML Widgets

Purpose Badges
Latest (master: future 8.0) Test Status Documentation Status: latest Binder:master
Stable Version Conda Version Documentation Status Binder:7.x
Communication Join the chat at https://gitter.im/ipython/ipywidgets Discourse

ipywidgets, also known as jupyter-widgets or simply widgets, are interactive HTML widgets for Jupyter notebooks and the IPython kernel.

Notebooks come alive when interactive widgets are used. Users gain control of their data and can visualize changes in the data.

Learning becomes an immersive, fun experience. Researchers can easily see how changing inputs to a model impact the results. We hope you will add ipywidgets to your notebooks, and we're here to help you get started.

Core Interactive Widgets

The fundamental widgets provided by this library are called core interactive widgets. A demonstration notebook provides an overview of the core interactive widgets, including:

  • sliders
  • progress bars
  • text boxes
  • toggle buttons and checkboxes
  • display areas
  • and more

Jupyter Interactive Widgets as a Framework

Besides the widgets already provided with the library, the framework can be extended with the development of custom widget libraries. For detailed information, please refer to the ipywidgets documentation.

Cookiecutter template for custom widget development

A template project for building custom widgets is available as a cookiecutter. This cookiecutter project helps custom widget authors get started with the packaging and the distribution of their custom Jupyter interactive widgets. The cookiecutter produces a project for a Jupyter interactive widget library following the current best practices for using interactive widgets. An implementation for a placeholder "Hello World" widget is provided as an example.

Popular widget libraries such as bqplot, pythreejs and ipyleaflet follow exactly the same template and directory structure. They serve as more advanced examples of usage of the Jupyter widget infrastructure.

Popular custom widget examples

Examples of custom widget libraries built upon ipywidgets are

  • bqplot a 2d data visualization library enabling custom user interactions.
  • pythreejs a Jupyter - Three.js wrapper, bringing Three.js to the notebook.
  • ipyleaflet a leaflet widget for Jupyter.

Install

The stable version of ipywidgets can be installed with pip or conda. If using JupyterLab, review the Front-end extension for JupyterLab section.

With pip:

pip install ipywidgets

With conda:

conda install -c conda-forge ipywidgets

Developer install from source

Installing from source is more complicated and requires a developer install, see the detailed developer install instructions.

If you want to install ipywidgets from source, you will need the yarn package manager version 1.2.1 or later. To install the latest master version from the root directory of the source code, run dev-install.sh. To only build the Python package enter pip install -e ..

Usage

See the examples section of the documentation. The widgets are being used in a variety of ways; some uses can be seen in these notebooks: Demo notebook of interactive widgets

Change log

Change log

Version Compatibility with Front-End Clients

Refer to change log for more detail.

ipywidgets JupyterLab Classic Notebook nbclassic
master - TBD
7.6.3 0.2.6
Legacy
6.x -
5.x 4.2 -
4.1.x 4.1 -
4.0.x 4.0 -

Contributing to ipywidgets

Developer information

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

See the LICENSE file in this repository for details.

Project Jupyter resources

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

ipywidgets-8.0.0a5.tar.gz (4.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipywidgets-8.0.0a5-py3-none-any.whl (125.5 kB view details)

Uploaded Python 3

File details

Details for the file ipywidgets-8.0.0a5.tar.gz.

File metadata

  • Download URL: ipywidgets-8.0.0a5.tar.gz
  • Upload date:
  • Size: 4.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for ipywidgets-8.0.0a5.tar.gz
Algorithm Hash digest
SHA256 2bcf3d9c1c7bee0c076d18eebd7a126dfbca6a397a95ca3488e21dc13af90369
MD5 b0c6f1b326addee7308c19ba19da3552
BLAKE2b-256 e37b2ee6d42e1b05f240fa286a76ae34bcced9647fc97a3eab66579f7e2aa0f0

See more details on using hashes here.

File details

Details for the file ipywidgets-8.0.0a5-py3-none-any.whl.

File metadata

  • Download URL: ipywidgets-8.0.0a5-py3-none-any.whl
  • Upload date:
  • Size: 125.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for ipywidgets-8.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 b7637b7afd0bcde5a5bcb0b36600f6924754a5294d2c8ca43426b6de50fe5641
MD5 e75402205a8432de826598133cbc5ac6
BLAKE2b-256 fa3a1b184579d30c33658d4000139034e25c9050bd779a5976f925b194cda791

See more details on using hashes here.

Supported by

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