--- id: anywidget version: "0.11.0" license: MIT license_treatment: permissive maintenance: active --- # anywidget — custom jupyter widgets made easy License: permissive · Maintenance: active · Downloads: 3.9M/mo ## What it is and what it does anywidget is a framework for authoring custom interactive widgets that run in Jupyter notebooks and compatible environments. Instead of using complex scaffolding templates, you define a Python class that inherits from anywidget.AnyWidget, attach JavaScript code (inline or from a file), and optionally add CSS styling. The framework handles syncing state between Python and the browser, letting you write interactive controls without leaving your notebook or Python package. The package is designed for both prototyping (write a widget directly in a .ipynb or .py file) and publishing (distribute your widget to others via PyPI like any normal Python package). It works across Jupyter, JupyterLab, Google Colab, VSCode, and marimo, with hot module replacement during development. Runtime dependencies are minimal: ipywidgets for the underlying widget protocol, psygnal for event signaling, and typing-extensions for type hints. Use it for: - Build a custom data visualization or control panel in a notebook without learning Jupyter's widget extension architecture. - Create a reusable interactive component and publish it to PyPI for others to install and use. - Prototype a widget interactively in a notebook cell, then move the JavaScript to a separate file for cleaner development. - Share interactive educational materials or dashboards that work consistently across Jupyter, Colab, and VSCode notebooks. - Develop widgets that sync state between Python and browser-based UI without manual serialization. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. anywidget lets you build custom interactive widgets for Jupyter and other notebook environments by writing Python classes with embedded or separate JavaScript/CSS, then publish them as standard PyPI packages. Yes. anywidget is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. Install it if you need to build or use custom interactive widgets in Jupyter notebooks without the overhead of traditional Jupyter extension development. The three-dependency footprint and recent release history make it a safe, practical choice for notebook-based interactive computing. ## Install pip install anywidget uv add anywidget poetry add anywidget ## Installing anywidget Before you install: Low friction: pure Python wheel with only three runtime dependencies (ipywidgets, psygnal, typing-extensions). Active maintenance with a recent release 109 days ago and 918 repository stars. License in practice: MIT license (permissive) means you can use, modify, and distribute anywidget and code built with it freely, including in commercial projects, with minimal restrictions. Quickstart: pip install anywidget import anywidget import ipywidgets class CounterWidget(anywidget.AnyWidget): _esm = """export default { render({ model, el }) { el.textContent = model.get('value'); } };""" value = ipywidgets.widget_int(0) Requires Python 3.10 or later. Verify before relying: - Whether the package works equally well in all listed environments (Jupyter, JupyterLab, Google Colab, VSCode, marimo) or if some have better support than others. - Performance characteristics and memory footprint when running many widgets simultaneously in a notebook. - How state synchronization between Python and JavaScript behaves under different network conditions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags jupyter custom widgets, interactive notebook widgets, reusable jupyter components, web-based notebook UI, jupyter widget framework, custom interactive controls, notebook widget library, jupyter-widgets, interactive-notebooks, web-components [View on SkillFed](https://skillfed.io/packages/anywidget) · [View on PyPI](https://pypi.org/project/anywidget/)