<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jupyter Blog - Steve Purves</title><link href="https://jasongrout.github.io/medium-archive/pelican/" rel="alternate"/><link href="https://jasongrout.github.io/medium-archive/pelican/feeds/author-steve-purves.atom.xml" rel="self"/><id>https://jasongrout.github.io/medium-archive/pelican/</id><updated>2026-04-16T15:28:00+00:00</updated><subtitle>The Project Jupyter blog: news, releases, and community stories, archived from blog.jupyter.org.</subtitle><entry><title>The MyST AnyWidget Directive</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2026/the-myst-anywidget-directive/" rel="alternate"/><published>2026-04-16T15:28:00+00:00</published><updated>2026-04-16T15:28:00+00:00</updated><author><name>Steve Purves</name></author><id>tag:jasongrout.github.io,2026-04-16:/medium-archive/pelican/posts/2026/the-myst-anywidget-directive/</id><summary type="html">&lt;p&gt;Authors of MyST Markdown can now embed interactive JavaScript widgets directly in content using the new {anywidget} directive.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Authors of MyST Markdown can now embed interactive JavaScript widgets directly in content using the new &lt;code&gt;{anywidget}&lt;/code&gt; directive.&lt;/p&gt;
&lt;h2 id="what-this-means"&gt;What this means&lt;/h2&gt;
&lt;p&gt;You can now add any javascript interactivity to your MyST Markdown website or Jupyter Book.&lt;/p&gt;
&lt;p&gt;Here’s an example that creates a clickable button 👇 to see an interactive version check out &lt;a href="https://jupyterbook.org/blog/posts/2026/the-myst-anywidget#how-we-got-here"&gt;the post on the Jupyter Book blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2026/the-myst-anywidget-directive/images/001-1_TksTxGw_ahJkRxlsIVU5_g.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;h2 id="how-we-got-here"&gt;How we got here&lt;/h2&gt;
&lt;p&gt;The idea of a portable widget interface for interactive computing isn’t new: &lt;a href="https://anywidget.dev"&gt;anywidget&lt;/a&gt; has been an emerging standard in the Jupyter community for a while, leveraging modern Javascript principles (via &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules"&gt;ESM Modules&lt;/a&gt;), and giving you a simple &lt;code&gt;initialize({ model }); render({ model, el })&lt;/code&gt;&lt;a href="https://jupyterbook.org/blog/posts/2026/the-myst-anywidget#fn-model"&gt;[1]&lt;/a&gt; contract so that widgets can be written once and reused across notebooks. AnyWidget in Jupyter interfaces supports tight integration with the kernel, allowing interactions similar to &lt;code&gt;ipywidgets&lt;/code&gt;&lt;a href="https://jupyterbook.org/blog/posts/2026/the-myst-anywidget#fn-jupyter"&gt;[2]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From the MyST Markdown and Jupyter Book point of view, we’ve focussed on supporting the &lt;code&gt;render()&lt;/code&gt; side of the AnyWidget interface (see &lt;a href="https://anywidget.dev/en/afm/#what-is-afm"&gt;AnyWidget Frontend Modules&lt;/a&gt;) to allow MyST users to bring any kind of javascript-based interactivity into their articles and books &lt;em&gt;without having to lean on Jupyter at all&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;That part of the story started at SciPy 2024 with &lt;a href="https://github.com/manzt"&gt;Trevor Mantz&lt;/a&gt; and Steve Purves hacking through a proof of concept during the sprints. Curvenote built working support for &lt;a href="https://www.npmjs.com/package/@curvenote/any-widget"&gt;AnyWidgets as a MyST Markdown extension&lt;/a&gt; while working with researchers to support domain specific visualizations, and then upstreamed the implementation to create the &lt;code&gt;{anywidget}&lt;/code&gt; directive that has just been released in &lt;code&gt;mystmd&lt;/code&gt; and &lt;code&gt;jb2&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The new directive in &lt;code&gt;mystmd&lt;/code&gt; and the respective supporting package in &lt;code&gt;@myst-theme/anywidget&lt;/code&gt; evolved with input from the JupyterBook team. Here’s how it is currently structured:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;anywidget&lt;/code&gt; is a new node in the MyST AST, meaning first-class support for this capability outside of notebooks.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mystmd&lt;/code&gt; will bundle ESM and CSS modules at build time, ensuring dependencies are packaged with the book/article when it is published or deployed.&lt;/li&gt;
&lt;li&gt;The ESM and CSS modules can either be (a) hosted remotely (which makes sense for shared widgets that many people are using or collaborating around) or (b) added as local files (which makes sense for widgets specific to a single book/website).&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;NodeRenderer&lt;/code&gt; part of the release is an independent package &lt;a href="https://www.npmjs.com/package/@myst-theme/anywidget"&gt;@myst-theme/anywidget&lt;/a&gt; that can be optionally adopted by theme developers (it’s already built into the core themes).&lt;/li&gt;
&lt;li&gt;For &lt;code&gt;mystmd&lt;/code&gt; and Jupyter Book users, to upgrade to the latest theme. Run &lt;code&gt;myst clean --templates&lt;/code&gt; before you next start your server and the latest version will be downloaded.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;p&gt;From an author’s perspective, point the directive at an ESM module (either a URL to a hosted script or a local path) and the widget runs in the page with its own state and DOM. You may optionally pass in a CSS URL/path and a JSON body of props to initialize the widget model.&lt;/p&gt;
&lt;p&gt;To understand how to build your own widgets, the &lt;a href="https://mystmd.org/guide/widgets"&gt;MyST widgets guide&lt;/a&gt; walks through the &lt;code&gt;render({ model, el })&lt;/code&gt; signature, styling with Shadow DOM, and cleanup on unmount. It’s the same mental model as &lt;code&gt;anywidget&lt;/code&gt; in Jupyter, so if you’ve written or seen Jupyter AnyWidgets, you’re already most of the way there.&lt;/p&gt;
&lt;p&gt;If you want to try it, the &lt;a href="https://github.com/jupyter-book/example-widgets"&gt;example-widgets repo&lt;/a&gt; has small demos (confetti, div-map, etc. Contributions are welcome!), and the &lt;a href="https://opensci.dev/"&gt;opensci.dev blog&lt;/a&gt; has some live examples using scientific datasets.&lt;/p&gt;
&lt;h2 id="whats-next"&gt;What’s next&lt;/h2&gt;
&lt;p&gt;Widget support in MyST is still marked experimental so the details may evolve. There are still some things on the roadmap for &lt;code&gt;{anywidget}&lt;/code&gt; which will no doubt expand as we hear of new requirements from widget creators, but we expect the following to be close to the top of the stack:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;model&lt;/code&gt; part of the interface, which will allow multiple instances of a widget to communicate on the page&lt;a href="https://jupyterbook.org/blog/posts/2026/the-myst-anywidget#fn-model"&gt;[1]&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Shipping additional dependencies like static files that the widgets may need&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The JupyterBook team is actively working on improving and evolving the widget model and integrating with Jupyter. We look forward to seeing what the community builds — visit the &lt;a href="https://discord.mystmd.org/"&gt;discord&lt;/a&gt; to showcase what you have built!&lt;/p&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;A shout out to my co-contributors on this work; to &lt;a href="https://github.com/manzt"&gt;@mantz&lt;/a&gt; for the original hacking, &lt;a href="https://github.com/rowanc1"&gt;@rowanc1&lt;/a&gt; and &lt;a href="https://github.com/fwkoch"&gt;@fwkoch&lt;/a&gt; for iterating on the downstream code, &lt;a href="https://github.com/agoose77"&gt;@agoose77&lt;/a&gt; for working with me on the upstream changes, &lt;a href="https://github.com/choldgraf"&gt;@choldgraph&lt;/a&gt; for insightful reviews and a docs! and &lt;a href="https://github.com/jupyter-book"&gt;the broader Jupyter Book Team&lt;/a&gt; for all the reviews and feedback.&lt;/p&gt;
</content><category term="anywidget"/><category term="Jupyter Book"/><category term="MyST"/></entry><entry><title>Curvenote joins the mybinder.org federation</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2024/curvenote-joins-the-mybinder-org-federation/" rel="alternate"/><published>2024-02-22T16:19:00+00:00</published><updated>2024-02-22T16:19:00+00:00</updated><author><name>Steve Purves</name></author><id>tag:jasongrout.github.io,2024-02-22:/medium-archive/pelican/posts/2024/curvenote-joins-the-mybinder-org-federation/</id><summary type="html">&lt;p&gt;Curvenote is now a part of the mybinder.org federation. By hosting a BinderHub instance running on the company’s infrastructure, additional…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Curvenote is now a part of the mybinder.org federation. By hosting a BinderHub instance running on the company’s infrastructure, additional capacity is available on the &lt;a href="https://mybinder.org"&gt;https://mybinder.org&lt;/a&gt; service.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="curvenote.com/for/journals" src="https://jasongrout.github.io/medium-archive/pelican/posts/2024/curvenote-joins-the-mybinder-org-federation/images/001-0_4FQGtOrs8XWEQ75G.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;&lt;a href="https://curvenote.com/for/journals"&gt;curvenote.com/for/journals&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The mybinder.org project provides a critical, free public service for scientists, researchers and educators worldwide. The ability to spin up a Jupyter server to run someone’s research code or run a class without local configuration is something that many academics and educators rely on.&lt;/p&gt;
&lt;p&gt;Mybinder.org runs on a set of open source software components and standards, that not only powers the service but that also allows us to make solid steps forward in reproducibility in scientific research, namely &lt;a href="https://repo2docker.readthedocs.io/en/latest/specification.html"&gt;REES&lt;/a&gt; and open source software components (like &lt;a href="https://github.com/jupyterhub/repo2docker"&gt;repo2docker&lt;/a&gt;) .&lt;/p&gt;
&lt;p&gt;This is something we’re keen to shout about as Curvenote runs numerous small scale, independent, BinderHubs to power its journal infrastructure for &lt;a href="https://curvenote.com/for/journals"&gt;notebook based publishing for reproducible scientific journals&lt;/a&gt; with BinderHub, Jupyter and MyST Markdown (&lt;a href="https://mystmd.org"&gt;https://mystmd.org&lt;/a&gt;) being important components of that.&lt;/p&gt;
&lt;p&gt;Over the last few months a lot of work has gone into bringing up the Curvenote BinderHub instance on AWS. This is mainly because in the process, the AWS workflow based deployment has been pushed forward by &lt;a href="https://www.linkedin.com/in/1simon/"&gt;Simon Li&lt;/a&gt; (&lt;a href="https://github.com/manics"&gt;@manics&lt;/a&gt;, University of Dundee, &lt;a href="https://jupyterhub-team-compass.readthedocs.io/en/latest/team/index.html#jupyterhub-team"&gt;JupyterHub Core Team&lt;/a&gt;), solving many previous roadblocks around EKS (Elastic Kubernetes Service) usage and paving the way for easier future AWS based deployments (watch out for a future post from Simon with all the technical details).&lt;/p&gt;
&lt;p&gt;It’s been great to collaborate with Simon during that time and get exposure to the details of BinderHub deployment on AWS.&lt;/p&gt;
&lt;p&gt;The mybinder.org service makes a significant positive impact on public education, science and research. This impact is directly supported by the volunteer time of the BinderHub core team and the federation member organizations. Curvenote’s instance adds capacity to the service and a broader group of organizations contributing to the organization would lead to a more resilient public service, that is less prone to disruption when a single federation member leaves. If your organization has the resources to run and maintain a BinderHub, or makes heavy use of the mybinder.org service, encourage your organizations to run an instance and &lt;a href="https://mybinder.readthedocs.io/en/latest/about/federation.html"&gt;join the federation&lt;/a&gt;.&lt;/p&gt;
</content><category term="Binder"/><category term="open science"/></entry></feed>