anywidget

anywidget: reusable widgets for interactive analysis and visualization in computational notebooks - Published in JOSS (2024)

https://github.com/manzt/anywidget

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    1 of 31 committers (3.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

jupyter marimo python widgets

Keywords from Contributors

standardization pde interpretability hydrology meshing correlation wavelets simulations pypy parallel

Scientific Fields

Engineering Computer Science - 60% confidence
Last synced: 4 months ago · JSON representation ·

Repository

reusable widgets made easy

Basic Info
  • Host: GitHub
  • Owner: manzt
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage: https://anywidget.dev
  • Size: 12.7 MB
Statistics
  • Stars: 729
  • Watchers: 10
  • Forks: 51
  • Open Issues: 14
  • Releases: 126
Topics
jupyter marimo python widgets
Created about 3 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Citation

README.md

anywidget logo. A circular icon with two connected arrows pointing clockwise, symbolizing a refresh or restart action
anywidget

reusable widgets made easy

installation . docs . discord . learn

About

anywidget is both a specification and toolkit for authoring reusable web-based widgets for interactive computing environments.

  • 🛠️ create custom Jupyter Widgets without complicated cookiecutter templates
  • 📚 publish to PyPI like any other Python package
  • 🤖 prototype within .ipynb or .py files
  • 🚀 run in Jupyter, JupyterLab, Google Colab, VSCode, marimo and more
  • ⚡ develop with instant HMR, like modern web frameworks

Learn more in the Jupyter blog.

Installation

anywidget is available on PyPI:

bash pip install "anywidget[dev]"

and also on conda-forge:

bash conda install -c conda-forge anywidget

Usage

The easiest way to start developing with anywidget is with the Python package.

```python import anywidget import traitlets

class CounterWidget(anywidget.AnyWidget): # Widget front-end JavaScript code esm = """ function render({ model, el }) { let button = document.createElement("button"); button.innerHTML = count is ${model.get("value")}; button.addEventListener("click", () => { model.set("value", model.get("value") + 1); model.savechanges(); }); model.on("change:value", () => { button.innerHTML = count is ${model.get("value")}; }); el.appendChild(button); } export default { render }; """ # Stateful property that can be accessed by JavaScript & Python value = traitlets.Int(0).tag(sync=True) ```

Front-end code can also live in separate files (recommend):

```python import pathlib import anywidget import traitlets

class CounterWidget(anywidget.AnyWidget): _esm = pathlib.Path("index.js") _css = pathlib.Path("styles.css") value = traitlets.Int(0).tag(sync=True) ```

Read the documentation to learn more.

Packages

Beyond the primary Python package, anywidget provides an ecosystem of tooling to help you build and distribute custom widgets.

| Name | Description | Version (click for changelogs) | | ------------------------------------------------------------------------------------------------ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | anywidget | Primary Python package | version | | npm:@anywidget/types | Client type declarations | version | | npm:@anywidget/vite | Vite plugin | version | | npm:@anywidget/react | React framework bridge | version | | npm:@anywidget/svelte | Svelte framework bridge | version | | npm:create-anywidget | CLI to bootstrap a new project | version | | jsr:@anywidget/deno | Backend for Deno Jupyter kernel | version | | jsr:@anywidget/signals | Signals bridge | version |

Support

Having trouble? Get help in our Discord or open a Discussion.

Contributing

New contributors welcome! Check out our Contributors Guide for help getting started.

Join us on Discord to meet other maintainers. We'll help you get your first contribution in no time!

Citation

If you use anywidget in your work, please consider citing the following publications:

Our JOSS paper describing the overall project and vision:

bibtex @article{manz2024anywidget, title = {anywidget: reusable widgets for interactive analysis and visualization in computational notebooks}, volume = {9}, url = {https://doi.org/10.21105/joss.06939}, doi = {10.21105/joss.06939}, number = {102}, journal = {Journal of Open Source Software}, author = {Manz, Trevor and Abdennur, Nezar and Gehlenborg, Nils}, year = {2024}, note = {Publisher: The Open Journal}, pages = {6939}, }

Our SciPy paper, detailing the motivation and approach behind Jupyter Widget ecosystem compatibility:

bibtex @inproceedings{manz2024notebooks, title = {Any notebook served: authoring and sharing reusable interactive widgets}, copyright = {https://creativecommons.org/licenses/by/4.0/}, url = {https://doi.org/10.25080/NRPV2311}, doi = {10.25080/NRPV2311}, urldate = {2024-10-07}, booktitle = {Proceedings of the 23rd {Python} in {Science} {Conference}}, author = {Manz, Trevor and Gehlenborg, Nils and Abdennur, Nezar}, month = jul, year = {2024}, }

Owner

  • Name: Trevor Manz
  • Login: manzt
  • Kind: user
  • Location: Brooklyn, NY
  • Company: marimo

curl -sL manzt.sh

JOSS Publication

anywidget: reusable widgets for interactive analysis and visualization in computational notebooks
Published
October 23, 2024
Volume 9, Issue 102, Page 6939
Authors
Trevor Manz ORCID
Department of Biomedical Informatics, Harvard Medical School, Boston, MA, USA
Nezar Abdennur ORCID
Department of Genomics and Computational Biology, UMass Chan Medical School, Worcester, MA, USA, Department of Systems Biology, UMass Chan Medical School, Worcester, MA, USA
Nils Gehlenborg ORCID
Department of Biomedical Informatics, Harvard Medical School, Boston, MA, USA
Editor
Hugo Ledoux ORCID
Tags
Computational notebooks Jupyter R Data visualization Interactive computing

Citation (CITATION.cff)

cff-version: 1.2.0
title: "anywidget"
authors:
  - given-names: "Trevor"
    family-names: "Manz"
    orcid: "https://orcid.org/0000-0001-7694-5164"
    affiliation: "Harvard Medical School"
url: "https://github.com/manzt/anywidget"
keywords:
  - Jupyter Notebooks
  - Jupyter Widgets
  - Data Visualization
  - Interactive Computing
  - Data Analysis
license: MIT
preferred-citation:
  type: article
  title: "anywidget: reusable widgets for interactive analysis and visualization in computational notebooks"
  authors:
    - given-names: "Trevor"
      family-names: "Manz"
      orcid: "https://orcid.org/0000-0001-7694-5164"
      affiliation: "Harvard Medical School"
    - given-names: "Nezar"
      family-names: "Abdennur"
      affiliation: "University of Massachusetts Chan Medical School"
      orcid: "https://orcid.org/0000-0001-5814-0864"
    - given-names: "Nils"
      family-names: "Gehlenborg"
      affiliation: "Harvard Medical School"
      orcid: "https://orcid.org/0000-0003-0327-8297"
  doi: "10.21105/joss.06939"
  journal: "Journal of Open Source Software"
  volume: "9"
  number: "102"
  pages: "6939"
  year: 2024
  publisher:
    name: "The Open Journal"

GitHub Events

Total
  • Create event: 116
  • Issues event: 100
  • Release event: 18
  • Watch event: 201
  • Delete event: 102
  • Issue comment event: 199
  • Push event: 172
  • Pull request review event: 12
  • Pull request review comment event: 8
  • Pull request event: 195
  • Fork event: 12
Last Year
  • Create event: 116
  • Issues event: 100
  • Release event: 18
  • Watch event: 201
  • Delete event: 102
  • Issue comment event: 199
  • Push event: 172
  • Pull request review event: 12
  • Pull request review comment event: 8
  • Pull request event: 195
  • Fork event: 12

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 721
  • Total Committers: 31
  • Avg Commits per committer: 23.258
  • Development Distribution Score (DDS): 0.484
Past Year
  • Commits: 130
  • Committers: 13
  • Avg Commits per committer: 10.0
  • Development Distribution Score (DDS): 0.585
Top Committers
Name Email Commits
Trevor Manz t****z@g****m 372
dependabot[bot] 4****] 159
github-actions[bot] 4****] 101
Talley Lambert t****t@g****m 41
Jan-Hendrik Müller 4****3 5
Kyle Kelley r****k@g****m 5
David Kouřil d****l@g****m 4
David Brochart d****t@g****m 3
Quentin Agren q****n@g****m 3
Manon Marchand m****2@g****m 2
Mark Keller 7****k 2
Nezar Abdennur n****r@g****m 2
Péter Gyarmati d****y@g****m 2
Qiusheng Wu g****s@g****m 2
Rowan Cockett r****1@g****m 2
Akshay Agrawal a****7@g****m 1
Ben Greiner c****e@b****e 1
Daniel S. Katz d****z@i****g 1
Daria Vasyukova d****k@g****m 1
Dominik Moritz d****z@g****m 1
Don McCurdy dm@d****m 1
Fritz Lekschas 8****e 1
Hervé BREDIN h****n 1
Iisakki Rotko i****o@w****o 1
Jeremy Tuloup j****p@g****m 1
Jon Mease j****e@g****m 1
Kurt Schwehr s****r@g****m 1
Kyle Barron k****2@g****m 1
Lasse Thomsen 1****s 1
Ryan Morshead r****d@g****m 1
and 1 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 110
  • Total pull requests: 736
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 4 days
  • Total issue authors: 58
  • Total pull request authors: 28
  • Average comments per issue: 1.86
  • Average comments per pull request: 1.4
  • Merged pull requests: 582
  • Bot issues: 2
  • Bot pull requests: 406
Past Year
  • Issues: 53
  • Pull requests: 257
  • Average time to close issues: 8 days
  • Average time to close pull requests: 4 days
  • Issue authors: 23
  • Pull request authors: 15
  • Average comments per issue: 0.75
  • Average comments per pull request: 1.08
  • Merged pull requests: 170
  • Bot issues: 2
  • Bot pull requests: 172
Top Authors
Issue Authors
  • UbeCc (24)
  • manzt (6)
  • paddymul (4)
  • kolibril13 (4)
  • MRYingLEE (4)
  • ianhi (3)
  • kylebarron (3)
  • mlamoureux (3)
  • benbovy (2)
  • Kreijstal (2)
  • asaboor-gh (2)
  • jakobtroidl (2)
  • fzyzcjy (2)
  • maartenbreddels (2)
  • rgbkrk (2)
Pull Request Authors
  • dependabot[bot] (290)
  • manzt (264)
  • github-actions[bot] (116)
  • dvdkouril (8)
  • kolibril13 (5)
  • kwentine (5)
  • ManonMarchand (4)
  • rowanc1 (4)
  • peter-gy (4)
  • rgbkrk (3)
  • jtpio (3)
  • keller-mark (2)
  • iisakkirotko (2)
  • schwehr (2)
  • Lasse-numerous (2)
Top Labels
Issue Labels
bug (21) enhancement (9) good first issue (2) documentation (1) bug-jupyter-widgets (1) experimental (1) dependencies (1) javascript (1)
Pull Request Labels
dependencies (290) javascript (256) github_actions (24) python (10) bug (1)

Packages

  • Total packages: 5
  • Total downloads:
    • npm 30 last-month
    • pypi 556,777 last-month
  • Total docker downloads: 10
  • Total dependent packages: 68
    (may contain duplicates)
  • Total dependent repositories: 26
    (may contain duplicates)
  • Total versions: 104
  • Total maintainers: 1
pypi.org: anywidget

custom jupyter widgets made easy

  • Versions: 53
  • Dependent Packages: 68
  • Dependent Repositories: 26
  • Downloads: 556,777 Last month
  • Docker Downloads: 10
Rankings
Dependent packages count: 0.5%
Average: 2.6%
Dependent repos count: 2.8%
Downloads: 2.9%
Docker downloads count: 4.1%
Maintainers (1)
Last synced: 4 months ago
npmjs.org: create-anywidget
  • Versions: 41
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 30 Last month
Rankings
Stargazers count: 3.9%
Forks count: 5.8%
Downloads: 20.4%
Average: 24.3%
Dependent repos count: 37.5%
Dependent packages count: 54.0%
Maintainers (1)
Last synced: 4 months ago
spack.io: py-anywidget

custom jupyter widgets made easy.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 27.4%
Dependent packages count: 54.7%
Last synced: 4 months ago
deno.land: anywidget

jupyter widgets made easy

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 27.9%
Dependent packages count: 55.7%
Last synced: 4 months ago
anaconda.org: anywidget

anywidget is a new Python library that greatly simplifies creating and publishing custom Jupyter Widgets. Unlike the traditional (cookiecutter) approach, with anywidget you 1) avoid fiddling with build steps and bundlers, 2) can prototype widgets from within a notebook, and 3) get a modern front-end developer experience.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 45.9%
Average: 48.2%
Dependent repos count: 50.5%
Last synced: 4 months ago

Dependencies

packages/deno/package.json npm
.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
  • pnpm/action-setup v2 composite
  • pnpm/action-setup v2.4.0 composite
.github/workflows/release.yml actions
  • actions/checkout v4 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4 composite
  • changesets/action v1 composite
  • pnpm/action-setup v2 composite
docs/package.json npm
  • astro ^2.10.15 development
  • html-escaper ^3.0.3 development
  • shiki ^0.14.1 development
  • vite ^4.1.4 development
  • @algolia/client-search ^4.13.1
  • @astrojs/markdown-remark ^2.2.1
  • @astrojs/mdx ^0.19.6
  • @astrojs/preact ^2.2.1
  • @astrojs/react ^2.2.1
  • @astrojs/tailwind ^3.1.3
  • @docsearch/css ^3.1.0
  • @docsearch/react ^3.1.0
  • @types/html-escaper ^3.0.0
  • @types/node ^18.0.0
  • @types/react ^18.2.8
  • @types/react-dom ^18.2.4
  • gray-matter ^4.0.3
  • preact ^10.7.3
  • react ^18.2.0
  • react-dom ^18.2.0
  • tailwindcss ^3.3.2
package.json npm
  • @changesets/cli ^2.26.2 development
  • @svitejs/changesets-changelog-github-compact ^1.1.0 development
  • dprint ^0.41.0 development
  • esbuild ^0.19.2 development
  • happy-dom ^12.2.1 development
  • publint ^0.2.2 development
  • typescript ^5.2.2 development
  • vitest ^0.34.5 development
packages/anywidget/package.json npm
  • @jupyter-widgets/base-manager ^1.0.6 development
  • @jupyterlab/builder ^3.6.5 development
  • @anywidget/types workspace:~
  • @anywidget/vite workspace:~
  • @jupyter-widgets/base ^2 || ^3 || ^4 || ^5 || ^6
packages/create-anywidget/package.json npm
  • @anywidget/react workspace:^ development
  • @anywidget/types workspace:^ development
  • @types/node ^20.7.1 development
  • @types/react ^18.2.21 development
  • @types/react-dom ^18.2.7 development
  • esbuild ^0.19.2 development
  • react ^18.2.0 development
  • react-dom ^18.2.0 development
  • typescript ^5.2.2 development
  • @clack/prompts ^0.7.0
  • just-snake-case ^3.2.0
  • kleur ^4.1.5
packages/react/package.json npm
  • @types/react ^18.2.21 development
  • @types/react-dom ^18.2.7 development
  • react ^18.2.0 development
  • react-dom ^18.2.0 development
  • @anywidget/types workspace:^
packages/svelte/package.json npm
  • svelte ^4.2.1 development
  • @anywidget/types workspace:^
packages/types/package.json npm
  • @jupyter-widgets/base ^6.0.6
packages/vite/package.json npm
  • vite ^4.4.9 development
pnpm-lock.yaml npm
  • 1099 dependencies
pyproject.toml pypi