Outline updated November 2026
Jupyter Widgets Programming
Class Duration
21 hours of live training delivered over 3 days.
Student Prerequisites
- Python and JavaScript programming experience
- Experience with the web browser DOM API is recommended
- Backbone.js experience helps only with the classic ipywidgets internals; the anywidget path does not need it
Target Audience
Python and JavaScript or TypeScript developers who want to add custom interactive widgets to JupyterLab and Jupyter Notebook. Students new to front-end work can prepare with Web Development Essentials: HTML, CSS, and JavaScript.
Description
This course teaches Python and JavaScript or TypeScript developers to build custom widgets for JupyterLab and Jupyter Notebook. It starts with how widgets are created and run, then covers built-in widgets, events, layout, and async widgets. Students build widgets with anywidget, which uses plain ES modules for the front end. Later modules cover the low-level features that power widgets and how to publish them. The class can be taught with JavaScript or TypeScript.
Learning Outcomes
- Extend JupyterLab and Jupyter Notebook with custom widgets.
- Build widgets in Python with JavaScript or TypeScript front ends.
- Set up a widget development environment with anywidget.
- Use the built-in ipywidgets controls.
- Lay out and style widgets.
- Write asynchronous widgets.
- Explain how widget models sync state between the kernel and the browser.
- Document and publish custom widgets.
Training Materials
Comprehensive courseware is distributed online at the start of class.
Software Requirements
Students will need a free, personal GitHub account to access the courseware. Students will need permission to install Python and Visual Studio Code on their computers. Also, students will need permission to install Python packages and Visual Studio Code extensions. Courseware targets ipywidgets 8.1, Jupyter Notebook 7, and the current anywidget release. If students are unable to configure a local environment, a cloud-based environment can be provided.
Training Topics
Extending JupyterLab
- What is JupyterLab?
- Python programming
- JavaScript programming
- Backbone.js in classic widgets
- Web application programming
- Ways to extend JupyterLab
Setting Up the Development Environment
- Python environments for widget development
- Installing JupyterLab and Notebook with pip or conda
- Front-end packages with npm
- Running the environment
Built-In Widgets
- Numeric widgets
- Boolean widgets
- Selection widgets
- String widgets
- Container and layout widgets
- Output widgets
- Other widgets
Widget Events
- Special events
- Traitlet events
- Linking widgets
- Continuous updates
- Debouncing
- Throttling
Widget Presentation
- Styling
- Layout
- User interaction with
interact
Asynchronous Widgets
- Event loop integration
- Generator-based interaction
- Background updates
anywidget
- anywidget vs. the ipywidgets cookiecutter
- ESM front-end modules
- Two-way state with traitlets
model.get,model.set, andmodel.on- Hot reload during development
- Bundling with esbuild or Vite
Low-Level Understanding of Widgets
- Communication between the kernel and the front end
- Synchronized state with traitlets
- Models and views
- Widget skeleton
- Serialization of widget attributes
- Installation, static assets, and distribution
Publishing a Widget
- Documentation
- The widget spec
- Publishing npm packages
- Updating the version number