anywidget
anywidget: reusable widgets for interactive analysis and visualization in computational notebooks - Published in JOSS (2024)
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
Keywords from Contributors
Scientific Fields
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
Metadata Files
README.md
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
.ipynbor.pyfiles - 🚀 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 | |
|
npm:@anywidget/types | Client type declarations | |
|
npm:@anywidget/vite | Vite plugin | |
|
npm:@anywidget/react | React framework bridge | |
|
npm:@anywidget/svelte | Svelte framework bridge | |
|
npm:create-anywidget | CLI to bootstrap a new project | |
|
jsr:@anywidget/deno | Backend for Deno Jupyter kernel | |
|
jsr:@anywidget/signals | Signals bridge | |
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
- Website: manzt.sh
- Repositories: 224
- Profile: https://github.com/manzt
curl -sL manzt.sh
JOSS Publication
anywidget: reusable widgets for interactive analysis and visualization in computational notebooks
Authors
Tags
Computational notebooks Jupyter R Data visualization Interactive computingCitation (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
Top Committers
| Name | 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
Pull Request Labels
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
- Documentation: https://anywidget.readthedocs.io/
- License: MIT
-
Latest release: 0.9.18
published 9 months ago
Rankings
Maintainers (1)
npmjs.org: create-anywidget
- Homepage: https://github.com/manzt/anywidget#readme
- License: MIT
-
Latest release: 0.8.3
published 6 months ago
Rankings
Maintainers (1)
spack.io: py-anywidget
custom jupyter widgets made easy.
- Homepage: https://github.com/manzt/anywidget
- License: []
-
Latest release: 0.9.18
published 5 months ago
Rankings
deno.land: anywidget
jupyter widgets made easy
- Documentation: https://doc.deno.land/https://deno.land/x/anywidget/mod.ts
- License: mit
-
Latest release: 0.1.2
published almost 2 years ago
Rankings
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.
- Homepage: https://github.com/manzt/anywidget
- License: MIT
-
Latest release: 0.9.18
published 9 months ago
Rankings
Dependencies
- 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
- actions/checkout v4 composite
- actions/setup-node v3 composite
- actions/setup-python v4 composite
- changesets/action v1 composite
- pnpm/action-setup v2 composite
- 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
- @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
- @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
- @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
- @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:^
- svelte ^4.2.1 development
- @anywidget/types workspace:^
- @jupyter-widgets/base ^6.0.6
- vite ^4.4.9 development
- 1099 dependencies
