<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Python on Posit Open Source</title>
    <link>https://opensource.posit.co/languages/python/</link>
    <description>Recent content in Python on Posit Open Source</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 12 Nov 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://opensource.posit.co/languages/python/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Great Docs Since v0.10: New Features, Faster Builds, and a Firmer Foundation</title>
      <link>https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/</link>
      <pubDate>Thu, 12 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/</guid>
      <dc:creator>Rich Iannone</dc:creator>
      <dc:creator>Hassan Kibirige</dc:creator><description><![CDATA[<p>When we <a href="https://opensource.posit.co/blog/2026-05-13_great-docs-ten-things/" target="_blank" rel="noopener">last wrote about Great
Docs</a>,
the project had just reached <code>v0.10.0</code> and we took the occasion to look
back over ten releases, one feature at a time. Six months have passed
since then. In that time we have shipped seven more releases (<code>v0.11.0</code>
through <code>v0.17.0</code>) and built up a substantial amount of work that will
be available in the next release. Altogether, that&rsquo;s a little over two
thousand commits from thirteen people. That is a lot of activity, and
much of it went toward making Great Docs more dependable for its users.</p>
<p>This post is a look at where things stand now. We&rsquo;ll start with the
people using Great Docs, since there are quite a few more of them than
there used to be (and that&rsquo;s changed how we think about the work). From
there, we&rsquo;ll survey the new and improved features and spend some time on
Termshow, our terminal recording tool, which started as a small addition
and has grown into something with its own direction. We&rsquo;ll finish with
two topics that matter more than any single feature: the speed of
builds, which is now a central focus, and the refactoring effort that
has been quietly rebuilding the tool&rsquo;s internals.</p>
<h2 id="who-is-using-great-docs">Who Is Using Great Docs
</h2>
<p>There are now well over a hundred public documentation sites built with
Great Docs. About ten of them belong to Posit projects such as <a href="https://posit-dev.github.io/great-tables/" target="_blank" rel="noopener">Great
Tables</a> and
<a href="https://posit-dev.github.io/pointblank/" target="_blank" rel="noopener">Pointblank</a>. The rest come
from the wider community and cover subjects as far apart as multiple
dispatch (<a href="https://coady.github.io/multimethod" target="_blank" rel="noopener">multimethod</a>), Bayesian
visualization (<a href="https://drbenvincent.github.io/tidydraws/" target="_blank" rel="noopener">tidydraws</a>),
web templating
(<a href="https://mkennedy.codes/docs/fastapi-chameleon/" target="_blank" rel="noopener">fastapi-chameleon</a>),
and comparative genomics
(<a href="https://datasnakes.github.io/OrthoEvolution/" target="_blank" rel="noopener">OrthoEvolution</a>). The
practical consequence of this growth is that any change to Great Docs
now reaches a lot of people at once. That&rsquo;s a responsibility we take
seriously, and it&rsquo;s why a fair share of the recent work has gone into
making the tool more predictable as it grows.</p>
<h2 id="documenting-more-than-python-apis">Documenting More Than Python APIs
</h2>
<p>Great Docs began as a tool for documenting the public API of a Python
package, and that remains its center of gravity. But a package&rsquo;s
interface often goes beyond its importable objects. Many packages ship a
command-line tool, some expose an MCP server for use by AI agents, and
an increasing number publish skill files that describe how an agent
should use them. Over the past several releases, Great Docs has learned
to document each of these.</p>
<p>Command-line documentation was the first to arrive. In <code>v0.11.0</code>, Great
Docs gained the ability to find a
<a href="https://click.palletsprojects.com/" target="_blank" rel="noopener">Click</a> command group and generate a
reference page for each subcommand, with the usage line, options,
arguments, and an extended description drawn from the docstring. Turning
it on takes a single setting:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">cli</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">enabled</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div></div>
<p>Since then, the same treatment has been extended to CLIs written in Go
(<code>v0.16.0</code>) and Rust (<code>v0.17.0</code>), and support for
<a href="https://typer.tiangolo.com/" target="_blank" rel="noopener">Typer</a> will be available in the next
release. The <code>v0.15.0</code> release added an index page for the CLI section,
and subcommands can be grouped into titled sections in the same way that
API reference entries can. The Great Docs site documents its own
command-line interface this way, so its reference pages are a fair
demonstration of what the feature produces.</p>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/assets/cli-reference.png" alt="The reference page for great-docs build, generated from the Click command and its docstring."></p>
<p>MCP servers came next, in <code>v0.13.0</code>. Great Docs reads the tools,
prompts, and resources a server declares and generates reference pages
for them, along with an index page that summarizes the server at a
glance. It also writes a <code>.well-known/mcp.json</code> manifest so that clients
can discover the server from the documentation site itself. For packages
that expose functionality to agents, this puts that functionality on the
same footing as the Python API. That seems only fair, given how much of
the interaction with some packages now happens through agents.</p>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/assets/mcp-reference.png" alt="The MCP Reference index page, summarizing the tools, prompts, and resources a server exposes."></p>
<p>There are more additions in the same spirit. Projects can now publish
multiple agent skills rather than a single one. A Package Info page
(added in <code>v0.15.0</code>) lists a package&rsquo;s dependencies and metadata, and a
License page (<code>v0.13.1</code>) presents the license with its SPDX identifier.
Type aliases declared with the PEP 695 <code>type</code> statement are documented
properly as of <code>v0.17.0</code>. Together they make a Great Docs site a
complete home for a package, where readers can find nearly everything
they need to know about it in one place.</p>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/assets/package-info.png" alt="The Package Info page, listing a package's metadata and its dependencies."></p>
<h2 id="richer-pages">Richer Pages
</h2>
<p>The other broad category of new features concerns what can go on a page.
Documentation is mostly prose and code, but the moments that teach the
most are often the ones where the reader can see or touch something. A
number of features added since <code>v0.10.0</code> aim at those moments.</p>
<p>The lightbox, introduced in <code>v0.14.0</code>, lets readers enlarge an image and
inspect it more closely. You can turn it on for a single image with a
<code>.lightbox</code> class or for a whole page with a frontmatter setting. It
supports captions, credits, galleries, zooming and panning, and
alternate images for dark mode:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><span class="line"><span class="cl">![<span class="nt">Singapore skyline</span>](<span class="na">../assets/city-singapore.jpg</span>){.lightbox
</span></span><span class="line"><span class="cl">  caption=&#34;The Singapore skyline along Marina Bay&#34;
</span></span><span class="line"><span class="cl">  credit=&#34;Photo via Pexels&#34;}</span></span></code></pre></div></div>
<p>The enlarged view includes a small toolbar for zooming, copying,
downloading, and linking directly to the image. The same release added a
<code>{{&lt; compare &gt;}}</code> shortcode that places two images under a draggable
slider. This is useful for showing a before and after state (a chart
under two themes, say, or a table before and after styling).</p>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/assets/lightbox-open.png" alt="An image opened in the lightbox, with its caption and the toolbar for zooming, copying, downloading, and linking."></p>
<p><a href="https://marimo.io/" target="_blank" rel="noopener">marimo</a> notebooks arrived in <code>v0.17.0</code>. A marimo
notebook is a plain Python file whose cells re-run reactively when their
inputs change, and Great Docs can embed one directly in a page using a
shortcode. In the default &ldquo;island&rdquo; mode, the notebook&rsquo;s outputs and
widgets appear inline and stay live, so readers can drag a slider and
watch the dependent cells recompute in the browser. An iframe mode goes
further and makes the code itself editable.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><span class="line"><span class="cl">{{&lt; marimo file=&#34;notebooks/reactive-intro.py&#34; &gt;}}</span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/assets/marimo-island.png" alt="A marimo notebook embedded in island mode: dragging the sliders updates the summary text and the bar chart."></p>
<p>Several more features round out this category. Collapsible details
blocks and mock code cells (which display code as if it had been
executed, without running it) arrived in <code>v0.11.0</code>. Code includes, added
in <code>v0.16.0</code>, let a page pull its examples from real source files so
they can&rsquo;t quietly drift away from the code. The next release adds
<a href="https://d2lang.com/" target="_blank" rel="noopener">D2</a> diagrams, pre-rendered to SVG with separate
light and dark versions. It also adds a wide layout toggle that appears
on large screens and lets readers widen the content column (press <code>w</code>,
or configure it with the <code>wide_layout</code> setting). Finally, a new
<code>great-docs check-examples</code> command runs the code cells in your pages
and the examples in your docstrings and reports any that fail. That
addresses a problem every maintainer has met: the documentation example
that stopped working two releases ago without anyone noticing.</p>
<h2 id="termshow">Termshow
</h2>
<p>Termshow is the part of Great Docs that has changed the most since May,
and it deserves a section of its own. It began in <code>v0.12.0</code> as a way to
record a terminal session and play it back on a documentation page. Many
packages are best introduced through a terminal (an installation, a
first command, a short interactive session). The usual ways of showing
this are a static code block, which conveys nothing of the experience,
or a video or GIF, which can&rsquo;t be searched, copied, or edited without
recording it again. A Termshow recording is a text file of timed
terminal output, and the player renders it in the browser, so the text
stays selectable and the file stays small.</p>
<p>The basic workflow is to record a session and then place it on a page
with a shortcode. What made Termshow more than a player, even in its
first release, was that a recording could be annotated after the fact.
You can divide it into chapters, highlight regions of the screen, attach
notes that appear at particular moments, and pick out snippets of output
that readers can copy. The Great Docs homepage uses a recording of this
kind to show the tool being installed and run, with chapter markers
along the bottom of the player.</p>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/assets/termshow-player.png" alt="The Termshow player on the Great Docs homepage, partway through the &quot;Build&quot; chapter of the demo recording."></p>
<p>Since August, Termshow has been available as a standalone Quarto
extension, so it can be used in any Quarto project and not only in sites
built with Great Docs. The work since then has gone in a few directions.
One is authoring. The Termshow Editor, launched with
<code>great-docs termshow edit</code>, is a browser application that lays a
recording out on a timeline. Chapters, annotations, cuts, highlights,
and snippets can then be placed visually rather than by writing
timestamps into a YAML file.</p>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/assets/termshow-editor.png" alt="The Termshow Editor, with the recording above and tracks for chapters, annotations, and snippets along the timeline."></p>
<p>Another direction addresses a weakness that every terminal recording
shares: it only shows what a tool printed on the day it was recorded.
Termshow now supports scripted recordings, in which a YAML file lists
the steps to perform and Termshow types them into a fresh shell:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">record</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">shell</span><span class="p">:</span><span class="w"> </span><span class="l">bash --norc</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">cols</span><span class="p">:</span><span class="w"> </span><span class="m">90</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">rows</span><span class="p">:</span><span class="w"> </span><span class="m">20</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">steps</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">marker</span><span class="p">:</span><span class="w"> </span><span class="l">Install</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">run</span><span class="p">:</span><span class="w"> </span><span class="l">pip install mypackage</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">marker</span><span class="p">:</span><span class="w"> </span><span class="l">Verify</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">run</span><span class="p">:</span><span class="w"> </span><span class="l">python -c &#34;import mypackage; print(mypackage.__version__)&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">sleep</span><span class="p">:</span><span class="w"> </span><span class="m">2</span></span></span></code></pre></div></div>
<p>Because the steps are written down, they can be run again. The
<code>termshow check</code> command reruns them, compares the screen at each marker
with the committed recording, and exits with an error if the output has
changed. Only the text is compared, so a slower machine or a different
color theme doesn&rsquo;t count as drift. You can also ignore patterns for
text that legitimately changes on every run (version numbers, dates,
temporary paths). Running this in CI turns a demo into something closer
to a test, and once the changes have been reviewed, an <code>--update</code> flag
records the drifted demos again.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">great-docs termshow check docs/assets/*.termshow.yml</span></span></code></pre></div></div>
<p>The remaining work has been about interoperability. Termshow can import
recordings from <a href="https://asciinema.org/" target="_blank" rel="noopener">asciinema</a> and scripts from
<a href="https://github.com/charmbracelet/vhs" target="_blank" rel="noopener">VHS</a>, and it can export to
asciicast, animated SVG, GIF, MP4, and WebM, as well as plain
transcripts and WebVTT captions. A <code>&lt;termshow-player&gt;</code> web component
lets a recording be embedded in any HTML page, and there is now a
written format specification with JSON Schemas. We looked carefully at
the existing tools before choosing this direction. The format used by
asciinema is the established standard, and it made sense to build on it
rather than compete with it. VHS has shown how much people value
recordings that can be scripted and run in CI. What no existing tool
really provides is the layer of editing and presentation that sits on
top of a recording, and that layer is where Termshow aims to be useful.
Termshow is currently installed as part of Great Docs, and making it
just as easy to use on its own is one of the things we&rsquo;re excited to
work on next.</p>
<h2 id="speed-as-a-focus">Speed as a Focus
</h2>
<p>If there is one theme that will shape the next several releases, it is
speed. We want builds to feel quick no matter how large a package gets.
Our approach has been to measure first (the <code>great-docs timings</code> command
reports how long each page took) and then make each step of a build
leaner. That has meant doing expensive work once per build and reusing
the results, building sidebars more efficiently, turning on Quarto&rsquo;s
freeze mechanism by default, and running independent tasks in parallel.
Many of these changes started with reports and contributions from people
documenting large packages. With those steps streamlined, most of a
build&rsquo;s time is now spent in <code>quarto render</code>, which renders pages one
after another in a single process. The next release tackles this
directly with parallel rendering:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">great-docs build --jobs auto</span></span></code></pre></div></div>
<p>With <code>--jobs</code>, Great Docs divides the pages into groups and renders them
with several Quarto processes at once. With <code>auto</code>, it picks the number
of processes from your CPU count, up to a maximum of eight. Each process
works in its own copy of the build directory and sees the whole project,
so navigation, cross-references, and the search index come out just as
they would in an ordinary build. At the end, the results are merged into
a single site. The groups are balanced using the per-page timings from
the previous build, so they all take about the same time to finish. On a
laptop with six performance cores, a 395-page site rendered in 52
seconds instead of two and a half minutes, and a 1,865-page site in a
little over three minutes instead of nineteen.</p>
<p>The feature is experimental and off by default for now. Small sites, and
a few kinds of site that can&rsquo;t be split safely, still render in one
process. If anything unexpected happens during a parallel render, its
output is discarded and the site is rendered the ordinary way. Further
out, we&rsquo;re watching <a href="https://github.com/quarto-dev/q2" target="_blank" rel="noopener">Quarto 2</a>
closely. It&rsquo;s being written with performance as a primary goal, and we
intend to adopt it as soon as it&rsquo;s ready.</p>
<h2 id="refactoring-and-a-firmer-foundation">Refactoring and a Firmer Foundation
</h2>
<p>Everything described so far is visible to anyone who uses Great Docs.
Some of the most consequential work of the past few months, though, has
happened beneath the surface, in a sustained effort to refactor the
tool&rsquo;s internals. The aim is to give every part of a build a clear place
and a clear responsibility. Each page should be produced correctly at
the stage where its content is generated, the API reference should be
assembled in distinct steps that can each be understood and tested, and
the code as a whole should pass strict type-checking. A good deal of
that is now in place, and the rest is being approached in the same
deliberate, step-by-step way.</p>
<p>The longer-term goal is a project that can grow without losing its
footing. To that end, every pull request now runs full builds of forty
test packages and compares the results with those from the existing
code, so any change in behavior, intended or not, shows up before it
reaches a release. That safeguard lets us keep reorganizing the
internals with confidence. It should also make the codebase easier for
new contributors to approach, since they can see where a change belongs
and find out when it has had an effect they didn&rsquo;t expect. The same
groundwork prepares Great Docs for larger shifts ahead, such as the move
to Quarto 2. This is the foundation on which the next year of features
will be built, and we think it will let them arrive faster and more
reliably than before.</p>
<h2 id="looking-ahead">Looking Ahead
</h2>
<p>Taken together, the work of the past six months points in a consistent
direction. The features have widened what Great Docs can document and
what can appear on a page. Termshow has grown from a playback widget
into a toolkit for terminal demonstrations that stay correct over time.
The speed work has made builds noticeably quicker, with more to come,
and the refactoring is giving the project a structure that can be tested
thoroughly and changed with confidence. With over a hundred projects now
depending on Great Docs, that last point may be the most important,
because it&rsquo;s what lets the project keep growing while staying something
people can rely on.</p>
<p>Much of what is described here is already released, and the rest (Typer
support, D2 diagrams, the wide layout, <code>check-examples</code>, parallel
rendering, and most of the recent Termshow work) will arrive in the next
release. If you would like to try Great Docs, it is <a href="https://pypi.org/project/great-docs/" target="_blank" rel="noopener">available on
PyPI</a>:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install great-docs</span></span></code></pre></div></div>
<p>The <a href="https://posit-dev.github.io/great-docs/" target="_blank" rel="noopener">documentation site</a> is
built from the latest development version, so it already shows the
upcoming features described above. If your builds are slower than you
think they should be, we&rsquo;d like to hear about it. You can open an <a href="https://github.com/posit-dev/great-docs/issues" target="_blank" rel="noopener">issue
on GitHub</a> for that or
for anything else you notice.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-11-12_great-docs-general-update/assets/great-docs-general-update.png" length="289076" type="image/png" />
    </item>
    <item>
      <title>mizu: thread-speed parallel R and Python over shared memory</title>
      <link>https://opensource.posit.co/blog/2026-11-05_mizu-0-1-0/</link>
      <pubDate>Thu, 05 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-11-05_mizu-0-1-0/</guid>
      <dc:creator>Charlie Gao</dc:creator><description><![CDATA[<p>Resampling is an expensive part of modelling work.
Fit the same model hundreds of times over, so you attempt to do them in parallel over a pool of workers.
However the speedup you get is usually much less than you&rsquo;d hoped for.</p>
<p>The reason lies in how a process pool distributes and coordinates work: each task is serialized, copied through a socket and deserialized on the other side, and each result comes back the same way.
When tasks are small, this overhead can exceed the computation itself, and when the data is large, every worker holding a copy exhausts memory.</p>
<p>Shared memory avoids both costs.
A task is written once into memory that both processes can see, and the worker reads it without copying.</p>
<p>We&rsquo;re introducing libmizu, a C library for lock-free shared memory IPC, and mizu and pymizu, the R and Python bindings to it.
Together they provide fast async and parallel computing on a single machine, and zero-copy data exchange between R and Python processes.</p>
<ul>
<li><a href="https://github.com/shikokuchuo/libmizu" target="_blank" rel="noopener">libmizu</a>, the C core</li>
<li><a href="https://github.com/shikokuchuo/mizu" target="_blank" rel="noopener">mizu</a>, the R package built on it, now on CRAN</li>
<li><a href="https://github.com/shikokuchuo/pymizu" target="_blank" rel="noopener">pymizu</a>, the Python package on the same core, now on PyPI</li>
</ul>
<p>The two bindings share one wire format, so R and Python processes can talk to each other directly.
Common data structures such as vectors, matrices, data frames and Arrow tables are shared between the two languages as zero-copy views.</p>
<p>The name &lsquo;mizu&rsquo; is Japanese for water: data flows between processes and takes the shape of whichever language receives it.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-1" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-1-1">R</a></li>
<li><a href="#tabset-1-2">Python</a></li>
</ul>
<div id="tabset-1-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;mizu&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p>Requires R 4.3 or later.</p>
</div>
<div id="tabset-1-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install pymizu</span></span></code></pre></div></div>
<p>Requires Python 3.10 or later.
Add <code>pymizu[numpy]</code> for zero-copy array views, and <code>pymizu[cloudpickle]</code> to submit lambdas and closures as tasks.
The extension compiles the vendored C core, so there is no system library to install.</p>
</div>
</div>
<p>For the C library, clone the repository and run <code>make</code>; see the README for further details.
All three are at the <em>experimental</em> lifecycle stage.</p>
<h2 id="from-100-µs-to-under-1-µs">From 100 µs to under 1 µs
</h2>
<p>A task round trip is the time to submit a trivial task to a pool and collect its result: the host publishes the task, a worker runs it, the result is published, and the host collects it.
On an Apple M4 Pro, this round trip takes 0.8 µs in R and 0.7 µs in Python, and 0.4 µs in the C core.
The same round trip over sockets, in mirai for R or <code>ProcessPoolExecutor</code> for Python, takes around 100 µs.</p>
<p>This gain of two orders of magnitude represents a generational leap, allowing you to divide work as finely as you would with threads.
A task of ten microseconds is worth sending to a worker, and a map over thousands of such tasks completes in milliseconds.</p>
<h2 id="meet-the-pool">Meet the pool
</h2>
<p>A pool is a set of worker processes that divide submitted tasks among themselves.
<code>submit</code> returns a handle immediately, and <code>collect</code> waits for the value.
<code>map</code> works the same way, but the function and data cross into shared memory once, and the workers claim ranges of elements from a shared cursor.</p>
<p>Creating the pool takes a short amount of time as each worker is a fresh R or Python process that needs to be started.
The usual practice is to start a pool once and keep it around, as everything after that one-time cost runs at the speeds shown above.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-2" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-2-1">R</a></li>
<li><a href="#tabset-2-2">Python</a></li>
</ul>
<div id="tabset-2-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">mizu</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">p</span> <span class="o">&lt;-</span> <span class="nf">mizu_pool</span><span class="p">(</span><span class="n">n_workers</span> <span class="o">=</span> <span class="m">4L</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">t</span> <span class="o">&lt;-</span> <span class="nf">mizu_submit</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="nf">sum</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">+</span> <span class="n">y</span><span class="p">,</span> <span class="n">x</span> <span class="o">=</span> <span class="m">1</span><span class="o">:</span><span class="m">10</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="m">100</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] 155</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">m</span> <span class="o">&lt;-</span> <span class="nf">mizu_map</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="nf">c</span><span class="p">(</span><span class="m">1</span><span class="p">,</span> <span class="m">4</span><span class="p">,</span> <span class="m">9</span><span class="p">,</span> <span class="m">16</span><span class="p">,</span> <span class="m">25</span><span class="p">),</span> <span class="n">sqrt</span><span class="p">,</span> <span class="n">.template</span> <span class="o">=</span> <span class="nf">numeric</span><span class="p">(</span><span class="m">1</span><span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] 1 2 3 4 5</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">mizu_pool_stop</span><span class="p">(</span><span class="n">p</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-2-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">math</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pymizu</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">with</span> <span class="n">pymizu</span><span class="o">.</span><span class="n">Pool</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span> <span class="k">as</span> <span class="n">pool</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="n">task</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">submit</span><span class="p">(</span><span class="nb">sum</span><span class="p">,</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">11</span><span class="p">),</span> <span class="mi">100</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">(</span><span class="n">task</span><span class="o">.</span><span class="n">collect</span><span class="p">(</span><span class="n">timeout</span><span class="o">=</span><span class="mi">5</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; 155</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    <span class="n">m</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">,</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">25</span><span class="p">])</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">(</span><span class="n">m</span><span class="o">.</span><span class="n">collect</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; [1.0, 2.0, 3.0, 4.0, 5.0]</span></span></span></code></pre></div></div>
<p><code>PoolExecutor</code> adapts a pool to the <code>concurrent.futures.Executor</code> interface, so code written against <code>ProcessPoolExecutor</code> drops in, and <code>wait</code>, <code>as_completed</code> and <code>asyncio.wrap_future</code> work unchanged.</p>
</div>
</div>
<h3 id="r-in-polars-out">R in, polars out
</h3>
<p>The workers in a pool don&rsquo;t have to be the same language as the host.
Here an R session passes its built-in <code>mtcars</code> data frame to Python workers, which summarize it with polars.
The data frame crosses as an Arrow-backed <code>pymizu.Frame</code>, and the polars result comes back as a data frame whose columns are zero-copy ALTREP views into the same polars frame.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-3" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-3-1">R</a></li>
<li><a href="#tabset-3-2">Python</a></li>
</ul>
<div id="tabset-3-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">p</span> <span class="o">&lt;-</span> <span class="nf">mizu_pool</span><span class="p">(</span><span class="n">n_workers</span> <span class="o">=</span> <span class="m">4L</span><span class="p">,</span> <span class="n">launcher</span> <span class="o">=</span> <span class="nf">mizu_py_launcher</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">t</span> <span class="o">&lt;-</span> <span class="nf">mizu_submit_call</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="n">p</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nf">mizu_call</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">.source</span> <span class="o">=</span> <span class="n">r</span><span class="s">&#34;(import polars as pl
</span></span></span><span class="line"><span class="cl"><span class="s">pl.DataFrame(x).group_by(&#39;cyl&#39;).agg(pl.col(&#39;mpg&#39;).mean()).sort(&#39;cyl&#39;))&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">x</span> <span class="o">=</span> <span class="n">mtcars</span>
</span></span><span class="line"><span class="cl">  <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;   cyl      mpg</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; 1   4 26.66364</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; 2   6 19.74286</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; 3   8 15.10000</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">mizu_pool_stop</span><span class="p">(</span><span class="n">p</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-3-2">
<p>The reverse direction: a Python host drives R workers and reads the result into polars.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">polars</span> <span class="k">as</span> <span class="nn">pl</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pymizu</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">with</span> <span class="n">pymizu</span><span class="o">.</span><span class="n">Pool</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="n">launcher</span><span class="o">=</span><span class="n">pymizu</span><span class="o">.</span><span class="n">r_launcher</span><span class="p">())</span> <span class="k">as</span> <span class="n">pool</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="n">task</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">submit</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">pymizu</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">source</span><span class="o">=</span><span class="s2">&#34;aggregate(mpg ~ cyl, data = mtcars, FUN = mean)&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">(</span><span class="n">pl</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">task</span><span class="o">.</span><span class="n">collect</span><span class="p">()))</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; shape: (3, 2)</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; ┌─────┬───────────┐</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ cyl ┆ mpg       │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ --- ┆ ---       │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ f64 ┆ f64       │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; ╞═════╪═══════════╡</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ 4.0 ┆ 26.663636 │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ 6.0 ┆ 19.742857 │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ 8.0 ┆ 15.1      │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; └─────┴───────────┘</span></span></span></code></pre></div></div>
</div>
</div>
<p>Notice that you did not need to perform any marshalling or conversion step on either side.
A numeric vector arrives in Python as a NumPy array, and a data frame as a <code>pymizu.Frame</code>, which <code>pl.from_arrow()</code> or <code>pa.table()</code> takes directly.
A NumPy array, or a polars, pyarrow or pandas frame, arrives in R as a vector or data frame.
Arrow tables and record batches cross the same way in both directions, and <code>mizu_as_arrow()</code> reads a received frame as Arrow in R.</p>
<p>Above a small size floor where it&rsquo;s faster to send the object directly, none of these crossings copies the data: both sides read the same shared pages.</p>
<h3 id="maps-within-maps">Maps within maps
</h3>
<p>A worker has access to its own pool, so a mapped function can itself map over the same workers, without deadlock. This is much more convenient than the workarounds we had to find in the past, such as tiered pool specifications.
Here the numbers 1 to 100,000 are split into four parts, and each part is split again across the pool to sum its square roots:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-4" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-4-1">R</a></li>
<li><a href="#tabset-4-2">Python</a></li>
</ul>
<div id="tabset-4-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">parts</span> <span class="o">&lt;-</span> <span class="nf">split</span><span class="p">(</span><span class="nf">as.numeric</span><span class="p">(</span><span class="m">1</span><span class="o">:</span><span class="m">100000</span><span class="p">),</span> <span class="nf">rep</span><span class="p">(</span><span class="m">1</span><span class="o">:</span><span class="m">4</span><span class="p">,</span> <span class="n">each</span> <span class="o">=</span> <span class="m">25000</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">m</span> <span class="o">&lt;-</span> <span class="nf">mizu_map</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">parts</span><span class="p">,</span> <span class="nf">\</span><span class="p">(</span><span class="n">part</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">nested</span> <span class="o">&lt;-</span> <span class="nf">mizu_map</span><span class="p">(</span><span class="nf">mizu_current_pool</span><span class="p">(),</span> <span class="n">part</span><span class="p">,</span> <span class="n">sqrt</span><span class="p">,</span> <span class="n">.template</span> <span class="o">=</span> <span class="nf">numeric</span><span class="p">(</span><span class="m">1</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">  <span class="nf">sum</span><span class="p">(</span><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">nested</span><span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="p">},</span> <span class="n">.template</span> <span class="o">=</span> <span class="nf">numeric</span><span class="p">(</span><span class="m">1</span><span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;       1       2       3       4</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; 2635310 4818361 6239529 7388808</span></span></span></code></pre></div></div>
</div>
<div id="tabset-4-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">math</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pymizu</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">parts</span> <span class="o">=</span> <span class="p">[</span><span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">25001</span><span class="p">),</span> <span class="nb">range</span><span class="p">(</span><span class="mi">25001</span><span class="p">,</span> <span class="mi">50001</span><span class="p">),</span> <span class="nb">range</span><span class="p">(</span><span class="mi">50001</span><span class="p">,</span> <span class="mi">75001</span><span class="p">),</span> <span class="nb">range</span><span class="p">(</span><span class="mi">75001</span><span class="p">,</span> <span class="mi">100001</span><span class="p">)]</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">part_total</span><span class="p">(</span><span class="n">part</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="n">nested</span> <span class="o">=</span> <span class="n">pymizu</span><span class="o">.</span><span class="n">current_pool</span><span class="p">()</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">,</span> <span class="n">part</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="nb">sum</span><span class="p">(</span><span class="n">nested</span><span class="o">.</span><span class="n">collect</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">with</span> <span class="n">pymizu</span><span class="o">.</span><span class="n">Pool</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span> <span class="k">as</span> <span class="n">pool</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="n">m</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="n">part_total</span><span class="p">,</span> <span class="n">parts</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">([</span><span class="nb">round</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">m</span><span class="o">.</span><span class="n">collect</span><span class="p">()])</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; [2635310, 4818361, 6239529, 7388808]</span></span></span></code></pre></div></div>
<p>A function defined in your own script, like <code>part_total()</code>, needs the <code>pymizu[cloudpickle]</code> extra, which pickles it by value.
Importable references such as <code>math.sqrt</code> pickle by reference, so the standard pickle suffices.</p>
</div>
</div>
<h3 id="async-without-the-polling">Async, without the polling
</h3>
<p>mizu provides event-driven async, with results feeding into an event loop without polling. For the highest efficiency, a burst of results produces only a single wake-up.</p>
<p>In R, a task or map handle is a promise: <code>then(task, fn)</code> resolves as soon as it completes.
mizu plugs into <code>later</code> and <code>promises</code> pipelines and is ready for Shiny.
In Python, you <code>await</code> a task or a map inside asyncio, and channels support <code>async for</code>.</p>
<h2 id="down-to-the-memcpy-floor">Down to the <code>memcpy</code> floor
</h2>
<p>Architecturally, mizu is quite different from mirai.
Socket-based frameworks pay for every message multiple times: serialize, copy through the kernel, deserialize.
mizu writes each payload once into shared memory in an efficient format.</p>
<p>Large vectors and data frames are mapped and arrive as ALTREP views in R, or as NumPy arrays and Arrow-backed frames in Python.
Workers claim tasks straight off lock-free queues, without requiring something like a task dispatcher in the middle.
Waiting stays out of the kernel entirely on the hot path, with a worker parking itself only when there is nothing to do.</p>
<p>By all measures, we&rsquo;re close to the <code>memcpy</code> floor, the physical limit at which bytes can move through memory.</p>
<h3 id="overhead-measured">Overhead, measured
</h3>
<p>The below is measured using 4 workers on an Apple M4 Pro.
The R figures are compared against mirai, and the Python figures against the standard library&rsquo;s <code>ProcessPoolExecutor</code>:</p>
<table>
  <thead>
      <tr>
          <th>Benchmark</th>
          <th>mizu</th>
          <th>mirai</th>
          <th>pymizu</th>
          <th>ProcessPoolExecutor</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Trivial task round trip</td>
          <td>0.8 µs</td>
          <td>100.5 µs</td>
          <td>0.7 µs</td>
          <td>94.2 µs</td>
      </tr>
      <tr>
          <td>Pipelined throughput, 1 worker</td>
          <td>833,000 tasks/s</td>
          <td>9,700 tasks/s</td>
          <td>2,390,000 tasks/s</td>
          <td>18,500 tasks/s</td>
      </tr>
      <tr>
          <td>Parallel map of 2,000 small tasks, 4 workers</td>
          <td>5.0 ms</td>
          <td>218 ms</td>
          <td>4.3 ms</td>
          <td>129 ms</td>
      </tr>
  </tbody>
</table>
<p>The benchmark scripts are in each repository and you can run them yourself.</p>
<h2 id="yes-microseconds-matter">Yes, microseconds matter
</h2>
<p>You may be wondering: going from 100 µs to 1 µs, these are tiny numbers, does it really matter?</p>
<p>The answer is unequivocally yes, and I have verified it with colleagues from the Tidymodels team.
The important thing to realise is that we&rsquo;re not dealing with each microbenchmark in isolation. In an actual workflow, many of these factors &mdash; transport costs, serialization costs, coordination costs &mdash; will compound and can sometimes reinforce each other if not optimally designed.</p>
<p>We ran four common modelling workloads on 12 workers of a 14-core Apple Silicon Mac, against a sequential baseline: bootstrap metrics, resampled model fits, permutation importance and bootstrap prediction intervals.
Each backend returned results identical to the sequential run.
The speedup versus sequential is shown below:</p>
<table>
  <thead>
      <tr>
          <th>Workload</th>
          <th>mizu</th>
          <th>mirai</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>A: Bootstrap metrics, 5,000 tasks of ~3 ms</td>
          <td>6.7x</td>
          <td>1.8x</td>
      </tr>
      <tr>
          <td>B: Resampled model fits, 250 tasks of ~45 ms</td>
          <td>7.9x</td>
          <td>4.0x</td>
      </tr>
      <tr>
          <td>C: Permutation importance, 240 tasks of ~85 ms</td>
          <td>8.1x</td>
          <td>6.4x</td>
      </tr>
      <tr>
          <td>D: Bootstrap prediction intervals, 400 tasks scoring 250,000 policies</td>
          <td>7.6x</td>
          <td>1.4x</td>
      </tr>
  </tbody>
</table>
<p>These workloads were chosen to be deliberately adversarial, each sized to stress data movement rather than compute.
That is why mirai, already the most performant parallel framework in R, shows such modest speedups here. Also note that 12 workers deliver at best an 8x speedup even with mizu. This is because there are still sequential parts to the workflow, such as collecting and combining the results, and it&rsquo;s what <a href="https://en.wikipedia.org/wiki/Amdahl%27s_law" target="_blank" rel="noopener">Amdahl&rsquo;s law</a> predicts.
The <a href="https://github.com/posit-dev/tidymodels-parallel-benchmark" target="_blank" rel="noopener">benchmark repository</a> contains the code, and my Tidymodels colleagues will follow up with a comprehensive report.</p>
<h2 id="know-the-limits">Know the limits
</h2>
<p>A few things to know before you start:</p>
<ul>
<li>The API is experimental. We may make changes to function names and arguments in response to feedback.</li>
<li>Workers don&rsquo;t see your session. A task runs in a fresh environment on the worker and sees only the arguments you pass: no globals, loaded packages or imports cross over. In R, a task must load any package it needs or use package-namespaced functions. In Python, a callable must be importable by the worker, or pickled by value with the <code>cloudpickle</code> extra.</li>
<li>Not every type crosses between languages. Vectors, strings, lists and dicts, dates and times, data frames and Arrow data cross between R and Python. Language objects such as formulas and functions do not, and mizu reports an error. Arrow data crosses exactly, but a few select types can change along the way: a dictionary-encoded column arrives in R as a factor, and unsigned integers arrive as wider signed types.</li>
<li>Small values are copied. The zero-copy floor is 256 KB for a single vector on a channel and 32 KB elsewhere. Below it, a value crosses as one quick copy.</li>
</ul>
<p>For R specifically:</p>
<ul>
<li>mizu doesn&rsquo;t replace <a href="https://mirai.r-lib.org" target="_blank" rel="noopener">mirai</a>.
mirai allows distributed computing, harnessing other machines on your network, an HPC cluster or the cloud, where shared memory doesn&rsquo;t reach.
If you&rsquo;re coming from mirai, the API will feel a little different: mizu was designed to be close to symmetrical between R and Python, so that it&rsquo;s easy to reach over in either direction, and this is the constraint we&rsquo;ve worked with.</li>
<li>mizu also interoperates with <a href="https://mori.r-lib.org" target="_blank" rel="noopener">mori</a>, which shares individual R objects: a mori shared object crosses a mizu channel or pool zero-copy.</li>
</ul>
<h2 id="from-mirai-to-mizu">From mirai to mizu
</h2>
<p>If you&rsquo;re wondering how we arrived at mizu, please allow me a brief account.</p>
<p>First, I discovered the data science and, in particular, the R community during the pandemic.
The problem I picked up in 2022 was the gap between R&rsquo;s scientific reach and its computing story: the ecosystem of packages had grown much faster than the machinery for running them in parallel.
R needed to play catch-up.</p>
<p><a href="https://mirai.r-lib.org" target="_blank" rel="noopener">mirai</a>, my first major package (Japanese for &lsquo;future&rsquo;), gave R true async capabilities: a task queue for scheduling over parallel or distributed workers and a thread pool for concurrent completions, with the communications layer moved off the main R thread.
It built on the work of others in our community.
Luke Tierney&rsquo;s parallel package gave us parallel computation with statistically valid pseudo-random numbers.
Henrik Bengtsson&rsquo;s future package popularised the concept of futures, or task handles, in R.
Garrett D&rsquo;Amore wrote NNG, the C messaging library that mirai runs on.
Working with Will Landau, Joe Cheng and Hadley Wickham brought mirai into targets, Shiny and purrr.</p>
<p><a href="https://mori.r-lib.org" target="_blank" rel="noopener">mori</a>, released this April, came at the same problem from a memory rather than a communications perspective.
Instead of copying an object to every worker, write it once into shared memory and send a reference.</p>
<p>That left a seed of an idea: if the objects live in shared memory, why not the instructions too?</p>
<p>From NNG GitHub discussions, I&rsquo;d seen people ask about shared memory as a way into the sub-10 µs messaging range, usually the preserve of high-frequency trading.
I researched this topic for a full three months before starting to write any code.
The sub-10 µs target fell early on, but my engineering curiosity led me to keep going until we&rsquo;d breached 1 µs.</p>
<p>Now R is no longer playing catch-up.
I&rsquo;m excited to share these same capabilities with the Python community.
For this reason, mizu is first and foremost a C library, with R and Python as equal bindings.
More may follow.</p>
<h2 id="look-outwards">Look outwards
</h2>
<p>If you read the commit history, you&rsquo;ll see that mizu was written with AI assistance.
Less visible is the three months of planning and research and design that came before any code was written. The implementation took another three months of deliberate engineering.</p>
<p>I&rsquo;m fortunate to work at a centre of open source software.
Without the shared discourse with this incredible and diverse group of people, mizu would not have been possible.
It may not even have been an idea.
I&rsquo;m especially grateful to Carlos Scheidegger, Andrew Holz and Hadley Wickham for their support and encouragement along the way.</p>
<p>As agents make it possible for one developer to do a great deal alone, I&rsquo;d encourage you to look outwards, to your fellow engineers, researchers and scientists.
I found my community in a pandemic lockdown.
You can find yours too.</p>
<h2 id="dive-in">Dive in
</h2>
<p>We welcome you to experiment with mizu.
It&rsquo;s early days, so expect rough edges: bug reports are the most valuable contribution you can make right now, and the more feedback we receive, the sooner we can reach a stable API.</p>
<ul>
<li><a href="https://github.com/shikokuchuo/libmizu" target="_blank" rel="noopener">libmizu</a></li>
<li><a href="https://github.com/shikokuchuo/mizu" target="_blank" rel="noopener">mizu</a></li>
<li><a href="https://github.com/shikokuchuo/pymizu" target="_blank" rel="noopener">pymizu</a></li>
</ul>
<p>We&rsquo;ll be working on plugging mizu into the ecosystem: Tidymodels and other Tidyverse packages, Shiny in both R and Python, and other places we&rsquo;ve probably not yet contemplated.
If you have ideas of where you&rsquo;d like to see this technology, open a discussion at the mizu or pymizu repo. We&rsquo;d love to hear from you!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-11-05_mizu-0-1-0/featured.gif" length="889855" type="image/gif" />
    </item>
    <item>
      <title>Bring your own agent to Positron with the Positron MCP</title>
      <link>https://opensource.posit.co/blog/2026-11-04_positron-mcp/</link>
      <pubDate>Wed, 04 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-11-04_positron-mcp/</guid>
      <dc:creator>Jonathan McPherson</dc:creator><description><![CDATA[<p>We&rsquo;re very proud of <a href="https://assistant.posit.co" target="_blank" rel="noopener">Posit Assistant</a>, our own agentic harness for data science. It&rsquo;s designed to be easy to use and <a href="https://opensource.posit.co/blog/2026-10-29_ai-newsletter">cost efficient</a>, and it is deeply integrated into Positron and RStudio.</p>
<p>However, in the months since we introduced Posit Assistant, we heard from many of you who prefer to use your own coding agent harness inside Positron. This might be for the familiar interface, or to get access to models and tokens that your company is already paying for (for example, via Claude Enterprise subscriptions) that aren&rsquo;t available in Assistant.</p>
<p>While we obviously think our own harness is pretty great, at Posit our goal is to build open tools that help you avoid vendor lock-in. We want to make Positron the best IDE for doing data work no matter what the rest of your ecosystem looks like, and that means giving third party agents access to the Positron IDE surface, too. We are also exploring ways to bring external agent engines via official SDKs to the model picker, allowing you to run tools like Claude, Copilot, or Codex while retaining Posit Assistant&rsquo;s familiar interface and permissions.</p>
<p>Towards that end, <a href="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release">in the 2026.10 release</a> of Positron, we&rsquo;ve added an experimental <strong>Positron MCP</strong> (a <a href="https://modelcontextprotocol.io/" target="_blank" rel="noopener">Model Context Protocol</a> server). This MCP exposes tools inside Positron that agents can use to work alongside you in the IDE.</p>
<p>To turn it on, enable the new <a href="positron://settings/ai.mcp.enabled">MCP: Enabled</a> setting:</p>
<img src="https://opensource.posit.co/blog/2026-11-04_positron-mcp/mcp-setting.png" data-fig-align="center" data-fig-alt="The AI &gt; MCP: Enabled setting in Positron&#39;s Settings UI" />
<p>With this setting enabled, Positron exposes an MCP server any agent harness can connect to, using the standard MCP protocol. Both agents running in terminal CLIs and agents running in Positron extensions can connect.</p>
<img src="https://opensource.posit.co/blog/2026-11-04_positron-mcp/claude-mcp.png" data-fig-align="center" data-fig-alt="Positron with Claude Code in a side panel calling Positron MCP tools (list_sessions, execute_code, get_plot). The R console shows the ggplot2 code it ran, labeled &#39;Claude Code&#39;, and the Plots pane shows the resulting map of seal movements off the Pacific coast." />
<h2 id="why-a-positron-mcp">Why a Positron MCP?
</h2>
<p>You don&rsquo;t actually <em>need</em> the Positron MCP to use other agent harnesses in Positron, as extensions like Claude Code and Codex already work well in Positron without it.</p>
<p>Without the MCP, however, using a third-party agent harness feels a lot like it might if you were using it inside a plain terminal. It can&rsquo;t see any of your data or live session information or other Positron context. If it wants to execute R or Python code, it&rsquo;ll do it using shell commands and you won&rsquo;t see what&rsquo;s going on.</p>
<p>With the MCP turned on, the agent can work alongside you in Positron:</p>
<ul>
<li>You&rsquo;ll see everything the agent does. It can pick up work you started, and you can finish work that it starts.</li>
<li>It can see your loaded data and will answer questions using it as context.</li>
<li>It can see your R and Python consoles, and run code in them. When the MCP runs code, it will be annotated with the agent name in the Console pane.</li>
<li>It can see your plots, too, and can help you iterate on them until they look very nice.</li>
<li>You can ask it questions about errors or problems and it&rsquo;ll know what you&rsquo;re talking about without any copying or pasting.</li>
</ul>
<h2 id="what-harnesses-does-it-work-with">What harnesses does it work with?
</h2>
<p>The Positron MCP works with just about any agent that supports MCP. We&rsquo;ve tested it with:</p>
<ul>
<li>Claude Code (extension and CLI)</li>
<li>Codex (extension and CLI)</li>
<li>OpenCode</li>
<li>Kiro</li>
<li>Gemini</li>
<li>Copilot CLI</li>
</ul>
<p>and more.</p>
<h2 id="using-the-mcp">Using the MCP
</h2>
<h3 id="one-time-setup">One-time setup
</h3>
<p>Enable the MCP in Settings, as described above, then run the <em>Positron MCP: Add to Coding Agent</em> command to automatically set up your coding agent. If your coding agent isn&rsquo;t on the list of those Positron knows how to configure, you can still use your agent in Positron! Run the command <em>Positron MCP: Show Connected Agents</em>, then choose &ldquo;Copy Connection Details&rdquo; option to get the information your agent needs to connect.</p>
<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p>Positron&rsquo;s MCPs are started inside projects, and know which project they&rsquo;re working with. If you have multiple windows open with different projects, each has its own MCP, and if you have a window open with <em>no</em> project or folder open, it doesn&rsquo;t currently run an MCP.</p>
</div>
</div>
<h3 id="agent-and-mcp-connections">Agent and MCP connections
</h3>
<p>Once the MCP is configured, you don&rsquo;t need to do anything special to start it, stop it, or manage the agent connection; Positron takes care of this automatically. When asking the agent to perform a task, it&rsquo;s helpful to mention &ldquo;Positron&rdquo; or tell it explicitly to &ldquo;use the Positron MCP&rdquo;.</p>
<p>If you&rsquo;re not sure whether Positron and your agent are on speaking terms, you can ask your agent, or enable the <a href="positron://settings/ai.mcp.statusBar">MCP Status Bar</a> setting:</p>
<img src="https://opensource.posit.co/blog/2026-11-04_positron-mcp/status-bar-option.png" data-fig-align="center" data-fig-alt="The AI &gt; MCP: Status Bar setting in Positron&#39;s Settings UI" />
<p>With this setting enabled, any coding agents connected will get an icon in the Status Bar. Hover over it to see them:</p>
<img src="https://opensource.posit.co/blog/2026-11-04_positron-mcp/mcp-status-bar.png" data-fig-align="center" data-fig-alt="The Positron status bar with Claude Code connected, showing a hover tooltip giving the name, PID, and version of the agent." />
<h2 id="security">Security
</h2>
<p>It&rsquo;s important to keep in mind that the MCP can be used to ask Positron to execute arbitrary code in your R and Python consoles &ndash; and that code will run with your user credentials. Exposing the Positron MCP to an agent is therefore equivalent to giving it unrestricted shell access.</p>
<p>Enabling the MCP doesn&rsquo;t mean you&rsquo;re doing away with security, though; it just means that you&rsquo;re <em>delegating</em> trust decisions to your agent harness. Most harnesses will prompt for confirmation and trust when running potentially dangerous operations, but not all. Make sure you understand your agent&rsquo;s trust model and are comfortable with its permissions and execution policies before connecting it to Positron.</p>
<h2 id="feedback">Feedback
</h2>
<p>How&rsquo;s your experience using the Positron MCP? Was it difficult to configure your agent? Missing any capabilities? We&rsquo;d love to hear from you on our <a href="https://github.com/posit-dev/positron/discussions" target="_blank" rel="noopener">discussion forum</a>!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-11-04_positron-mcp/positron-and-agents.png" length="452291" type="image/png" />
    </item>
    <item>
      <title>posit::glimpse() Newsletter – November 2026</title>
      <link>https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/</link>
      <pubDate>Wed, 04 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/</guid>
      <dc:creator>Isabella Velásquez</dc:creator><description><![CDATA[<blockquote>
<p>Welcome to our newsletter, posit::glimpse()!</p>
<p>If you&rsquo;re currently reading this on our blog, consider subscribing to Product Updates - Open Source on our <a href="https://posit.co/about/subscription-management" target="_blank" rel="noopener">subscription page</a> to receive this newsletter directly in your inbox.</p>
<p>Prefer an RSS reader? posit::glimpse() now has its own RSS feed! Find it on our <a href="https://opensource.posit.co/subscribe/" target="_blank" rel="noopener">subscribe page</a>.</p>
</blockquote>
<p>Every month, we round up some of the most important open-source news for Posit&rsquo;s community! We hope that you enjoy this newsletter and maybe even share it with a friend.</p>
<p>The table of contents on the right can help you navigate through all the updates. As you scroll, it will open up to show you subcategories →</p>
<h2 id="key-product-updates-and-new-releases">Key product updates and new releases
</h2>
<h3 id="quarto-111">Quarto 1.11
</h3>
<p><a href="https://quarto.org/" target="_blank" rel="noopener">Quarto</a> 1.11 is out, released early to deliver a Deno security update that protects HTTPS requests made by Quarto commands, including publishing and downloading extensions. Quarto 1.10.20, released just before, is the final patch in the 1.10 series, so all users should upgrade to 1.11. Alongside the security update, this release brings broad accessibility improvements to HTML documents, websites, books, and presentations (skip-to-content links, a more visible keyboard focus ring, and preserved alternative text for diagrams and Word figures), lists of figures and tables for Typst documents, Julia engine improvements, and fixes to shared metadata. You can also adopt the Quarto 2 definition list syntax now, ahead of the next major version.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-11-02_quarto-1-11/" target="_blank" rel="noopener">Quarto 1.11</a> blog post.</li>
</ul>
<h3 id="great-tables-v100-and-v110">Great Tables v1.0.0 and v1.1.0
</h3>
<p><a href="https://posit-dev.github.io/great-tables/" target="_blank" rel="noopener">Great Tables</a> reaches 1.x with v1.0.0 and v1.1.0. The stable core API gains new formatters, value-based conditional styling, multi-column stubs, decimal alignment, and diverging, row-wise, and custom <code>data_color()</code> scales with APCA-based text contrast. HTML output is now accessible by default.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/" target="_blank" rel="noopener">Great Tables v1.0.0 and v1.1.0: new formatters, conditional styling, multi-column stubs, and richer color scales</a> blog post.</li>
</ul>
<h3 id="positron">Positron
</h3>
<p><a href="https://positron.posit.co/" target="_blank" rel="noopener">Positron</a> is a next-generation data science IDE for R and Python. The 2026.10 release brings Posit Assistant that can drive Positron itself, a built-in MCP server for your own coding agents, Data Connections on by default, faster language features for Quarto, and smoother interpreter and project setup. Posit Assistant can now tap into Positron&rsquo;s packages, interpreters, consoles, and publishing tools, so its answers and actions match your actual environment.</p>
<p><div class="not-prose"><figure>
    <img class="h-auto max-w-full rounded-lg"
      src="https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/images/positron-assistant-data-explorer.png"
      alt="Positron window with Posit Assistant in the sidebar responding to the request &ldquo;OK, open the Pokemon Excel file so I can see it.&rdquo; Positron has opened pokemon.xlsx in the Data Explorer, showing column summaries with distribution sparklines and a grid of 949 rows and 22 columns." 
      loading="lazy"
    >
  </figure></div>
</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/" target="_blank" rel="noopener">Positron October Release Highlights</a> and <a href="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/" target="_blank" rel="noopener">A deeper Positron integration for Posit Assistant</a> blog posts.</li>
</ul>
<p>Have a question, a tip, or something cool you&rsquo;ve built? Come say hi on the <a href="https://www.reddit.com/r/PositronIDE/" target="_blank" rel="noopener">Positron subreddit</a>, where the community is up and running!</p>
<h3 id="rig-0110">rig 0.11.0
</h3>
<p><a href="https://rig.r-lib.org/" target="_blank" rel="noopener">rig</a> is a command-line tool for installing and managing multiple R versions. rig 0.11.0 is a major release, covered in a three-part blog series.</p>
<h4 id="rig-0110-part-one-r-installations">rig 0.11.0 part one: R installations
</h4>
<p>rig 0.11.0 adds a user mode for installing R into your home directory without admin rights on macOS, Windows, and Linux, plus portable Linux builds, Rtools management, and automatic RStudio and Positron configuration. Repository management is improved too: P3M is now the default on most platforms, and new commands add custom repos and check repo status. rig also has a new website at <a href="https://rig.r-lib.org/" target="_blank" rel="noopener">rig.r-lib.org</a>.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-09_rig-0-11-0-part-one/" target="_blank" rel="noopener">rig 0.11.0 part one: R installations</a> blog post.</li>
</ul>
<h4 id="rig-0110-part-two-r-packages">rig 0.11.0 part two: R packages
</h4>
<p>Part two introduces <code>rig pkg</code>, a pak-like command-line tool for installing packages from CRAN, GitHub, git, URLs, and local paths with version constraints, a dependency solver, parallel downloads, and caching. It also adds <code>rig pkg doctor</code> for checking library health, commands for package info, dependency trees, and CRAN search, named libraries, and automatic system requirements on major Linux distributions.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-12_rig-0-11-0-part-two/" target="_blank" rel="noopener">rig 0.11.0 part two: R packages</a> blog post.</li>
</ul>
<h4 id="rig-0110-part-three-r-projects">rig 0.11.0 part three: R projects
</h4>
<p>The final part introduces <code>rig proj</code>, a project manager for R in the style of Python&rsquo;s uv and Rust&rsquo;s cargo. It uses an <code>rproj.toml</code> manifest and universal <code>rproj.lock</code> files that cover multiple platforms, syncs to fast project virtual environments that share package files, and runs code with <code>rig run</code>, including inline-dependency scripts. Projects can be imported from DESCRIPTION files or renv lock files.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-15_rig-0-11-0-part-three/" target="_blank" rel="noopener">rig 0.11.0 part three: R projects</a> blog post.</li>
</ul>
<h3 id="shiny-for-python-19">Shiny for Python 1.9
</h3>
<p><a href="https://shiny.posit.co/py/" target="_blank" rel="noopener">Shiny for Python</a> 1.9 removes the process-wide lock on reactive updates, so async effects and outputs now run concurrently within and across sessions. The release also adds <code>session.run_once_when_idle()</code>, immediate UI updates from background tasks, accessible sidebar landmarks via <code>ui.sidebar(role=)</code>, Express download buttons with icons, and 2–3.5× faster data frame serialization. It includes a few breaking changes, notably that <code>ui.sidebar()</code> now renders a <code>&lt;div&gt;</code> rather than an <code>&lt;aside&gt;</code>.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-29_shiny-python-1-9/" target="_blank" rel="noopener">Shiny for Python 1.9</a> and <a href="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/" target="_blank" rel="noopener">Concurrent Async</a> blog posts.</li>
</ul>
<p>Looking for a little inspiration for your next app? Take a stroll through the <a href="https://posit-shiny-in-the-public-sector.share.connect.posit.cloud/" target="_blank" rel="noopener">Shiny in the Public Sector gallery</a>, which is filled with real-world examples of how teams are using Shiny to share data and serve their communities. It&rsquo;s a great place to spark ideas, and maybe borrow a trick or two!</p>
<h2 id="ai-updates">AI updates
</h2>
<p>Catch up on the latest from Posit&rsquo;s AI newsletter:</p>
<ul>
<li><a href="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/" target="_blank" rel="noopener">Correct, transparent, and reproducible data agents</a>: An annotated walkthrough of our posit::conf(2026) keynote on building trustworthy AI tools for data analysis, including Posit Assistant and the introduction of commons.</li>
<li><a href="https://opensource.posit.co/blog/2026-10-23_ai-newsletter/" target="_blank" rel="noopener">Unfortunately, you need to care about token caching</a>: A look at the anatomy of an LLM &ldquo;conversation&rdquo; and how understanding cache hits and misses can help you keep costs down.</li>
<li><a href="https://opensource.posit.co/blog/2026-10-29_ai-newsletter/" target="_blank" rel="noopener">Posit Assistant is cost-efficient</a>: How we measured Posit Assistant&rsquo;s token usage and why it makes better use of your token budget than leading coding agents.</li>
</ul>
<p>Want to see commons in action? Sara and Simon recently walked through a real workflow in the <a href="https://youtu.be/4rUzyOIvAog" target="_blank" rel="noopener">commons workflow demo</a> on YouTube.</p>
<h2 id="learning-resources">Learning resources
</h2>
<h3 id="recent-data-science-lab-episodes">Recent Data Science Lab episodes
</h3>
<p>The <a href="https://pos.it/dslab" target="_blank" rel="noopener">Data Science Lab</a> is a fun, chill session where practitioners share their screens and live code through real data science workflows. Missed a live session? Catch up on these recent episodes:</p>
<ul>
<li><a href="https://youtu.be/rthgRFzx30g" target="_blank" rel="noopener">How do you validate data in R using Pointblank?</a> with Rich Iannone</li>
<li><a href="https://youtu.be/eYhSbSsBHTs" target="_blank" rel="noopener">How do you create custom geoms in ggplot2?</a> with Gina Reynolds</li>
<li><a href="https://youtu.be/ONAl7iD9h68" target="_blank" rel="noopener">How do you create custom Revealjs themes in Quarto?</a> with Emil Hvitfeldt</li>
</ul>
<h3 id="new-free-posit-academy-courses">New free Posit Academy courses
</h3>
<p>Looking to learn something new? Check out these free courses from Posit Academy, now available on our resources page:</p>















  
  
  
  
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  



<div class="grid grid-cols-2 gap-6 xl:gap-8 xl:gap-8 mb-6">
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
    
  











  
  










  
  
    
  
    
  






















  
    
  






























<div id="item-7609856954675784816d30d194cca788" class="@container h-full">
  <a href="https://opensource.posit.co/resources/courses/introduction-to-quarto/" title="Introduction to Quarto"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl">
      
        









  
  
    <img src="https://opensource.posit.co/resources/courses/introduction-to-quarto/image.svg" alt="Introduction to Quarto" class="mx-auto h-full w-full object-cover" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>Oct 16, 2026</span>
          <span>|</span>
        
        
        
          <span>30 min</span>
          
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Introduction to Quarto</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Learn what Quarto is and how to write your first Quarto documents: markdown text, YAML options, output formats, and R or Python code cells, all practiced in an in-browser Quarto simulator</p>
      

      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Positron
              </span>
            
              <span class="pill">
                Quarto
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  





  








  
  





  
    
  











  
  










  
  
    
  






















  
    
  






























<div id="item-adf36cfea0982fd15ff2ff6597f1a15a" class="@container h-full">
  <a href="https://opensource.posit.co/resources/courses/introduction-to-positron/" title="Introduction to Positron"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl">
      
        









  
  
    <img src="https://opensource.posit.co/resources/courses/introduction-to-positron/image.svg" alt="Introduction to Positron" class="mx-auto h-full w-full object-cover" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>Jul 31, 2026</span>
          <span>|</span>
        
        
        
          <span>3 courses</span>
          
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Introduction to Positron</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">A collection of courses to get started using Positron!</p>
      

      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Positron
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
    
  











  
  










  
  
    
  
    
  






















  
    
  






























<div id="item-9a8ce16a9a5d811a12824be953ea2587" class="@container h-full">
  <a href="https://opensource.posit.co/resources/courses/introduction-to-shiny-python-focus/" title="Introduction to Shiny - Python Focus"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl">
      
        









  
  
    <img src="https://opensource.posit.co/resources/courses/introduction-to-shiny-python-focus/image.svg" alt="Introduction to Shiny - Python Focus" class="mx-auto h-full w-full object-cover" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>Mar 18, 2026</span>
          <span>|</span>
        
        
        
          <span>20 min</span>
          
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Introduction to Shiny - Python Focus</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">An introduction to building interactive web applications with Shiny in Python. Covers what Shiny is, how apps are structured, and the basics of inputs, outputs, and reactivity</p>
      

      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Shiny for Python
              </span>
            
              <span class="pill">
                Shiny
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
    
  











  
  










  
  
    
  






















  
    
  






























<div id="item-a716a0a49c43e6f14c5a0f91a88be32b" class="@container h-full">
  <a href="https://opensource.posit.co/resources/courses/getting-started-with-posit-ai-in-positron/" title="Getting Started with Posit AI Pass in Positron"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl">
      
        









  
  
    <img src="https://opensource.posit.co/resources/courses/getting-started-with-posit-ai-in-positron/image.svg" alt="Getting Started with Posit AI Pass in Positron" class="mx-auto h-full w-full object-cover" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>Sep 23, 2026</span>
          <span>|</span>
        
        
        
          <span>26 min</span>
          
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Getting Started with Posit AI Pass in Positron</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Set up Posit AI Pass in Positron and put Posit Assistant and Next Edit Suggestions to work in your Python and R projects</p>
      

      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Positron
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
</div>


<p>Browse the full list on the <a href="https://opensource.posit.co/resources/courses/" target="_blank" rel="noopener">courses page</a>.</p>
<h3 id="explore-our-new-books-page">Explore our new books page
</h3>
<p>Our open source website now has a <a href="https://opensource.posit.co/resources/books/" target="_blank" rel="noopener">books page</a>! It brings together books on R, Python, Shiny, modeling, and more, all in one place. Here are a few to get you started:</p>















  
  
  
  
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  



<div class="grid grid-cols-4 gap-6 xl:gap-8 xl:gap-8 mb-6">
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
  
    
  







  





  
  






  





  
  
    
  
    
  
    
  
    
  
    
  
    
  


  

  


















































<div id="item-af85267f654d76ce1c14701557ef121d" class="@container h-full">
  <a href="https://opensource.posit.co/resources/books/r-for-data-science/" title="R for Data Science"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #929747 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/r-for-data-science/cover_hu_d98b63478aedafa9.webp 1x,
                  /resources/books/r-for-data-science/cover_hu_73a353b11fecbd49.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/r-for-data-science/cover_hu_e54c46be9eb16ab8.jpg"
          srcset="/resources/books/r-for-data-science/cover_hu_e54c46be9eb16ab8.jpg 1x,
                  /resources/books/r-for-data-science/cover_hu_7d6a02258c89dd75.jpg 2x"
          alt="R for Data Science"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/r-for-data-science/cover_hu_73a353b11fecbd49.webp 1x,
                  /resources/books/r-for-data-science/cover_hu_b830ffecfbcdc2b0.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/r-for-data-science/cover_hu_7d6a02258c89dd75.jpg"
          srcset="/resources/books/r-for-data-science/cover_hu_7d6a02258c89dd75.jpg 1x,
                  /resources/books/r-for-data-science/cover_hu_3e7d50c2900290ad.jpg 2x"
          alt="R for Data Science"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/r-for-data-science/cover_hu_b830ffecfbcdc2b0.webp 1x,
                  /resources/books/r-for-data-science/cover_hu_2148b924e476a941.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/r-for-data-science/cover_hu_3e7d50c2900290ad.jpg"
          srcset="/resources/books/r-for-data-science/cover_hu_3e7d50c2900290ad.jpg 1x,
                  /resources/books/r-for-data-science/cover_hu_aababf9db56afbd9.jpg 2x"
          alt="R for Data Science"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>June 2023</span>
          
        
        
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">R for Data Science</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Import, Tidy, Transform, Visualize, and Model Data</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/hadley-wickham/profile.jpg"
          alt="Hadley Wickham"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ><img
          src="https://opensource.posit.co/people/mine-%C3%A7etinkaya-rundel/profile.jpg"
          alt="Mine Çetinkaya-Rundel"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white -ml-2"
          style="z-index: 9;"
        ><img
          src="https://opensource.posit.co/images/person-placeholder.svg"
          alt="Garrett Grolemund"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white -ml-2"
          style="z-index: 8;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Hadley Wickham,&nbsp;Mine Çetinkaya-Rundel,&nbsp;Garrett Grolemund</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                tidyverse
              </span>
            
              <span class="pill">
                dplyr
              </span>
            
              <span class="pill">
                ggplot2
              </span>
            
              <span class="pill">
                tidyr
              </span>
            
              <span class="pill">
                readr
              </span>
            
              <span class="pill">
                Quarto
              </span>
            
              <span class="pill">
                Data Wrangling
              </span>
            
              <span class="pill">
                Visualization
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
  
    
  







  





  
  






  





  
  


  


















































<div id="item-67525c48b5cbb2f3f5be94df703e7d7e" class="@container h-full">
  <a href="https://opensource.posit.co/resources/books/python-for-data-analysis/" title="Python for Data Analysis"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #776342 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/python-for-data-analysis/cover_hu_e6a102fe44583152.webp 1x,
                  /resources/books/python-for-data-analysis/cover_hu_6031106aad584cd5.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/python-for-data-analysis/cover_hu_d17ba488224df1f8.jpg"
          srcset="/resources/books/python-for-data-analysis/cover_hu_d17ba488224df1f8.jpg 1x,
                  /resources/books/python-for-data-analysis/cover_hu_90f0c2afe9197804.jpg 2x"
          alt="Python for Data Analysis"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/python-for-data-analysis/cover_hu_6031106aad584cd5.webp 1x,
                  /resources/books/python-for-data-analysis/cover_hu_75d5f95a55813323.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/python-for-data-analysis/cover_hu_90f0c2afe9197804.jpg"
          srcset="/resources/books/python-for-data-analysis/cover_hu_90f0c2afe9197804.jpg 1x,
                  /resources/books/python-for-data-analysis/cover_hu_7d469a3e1c61d4ed.jpg 2x"
          alt="Python for Data Analysis"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/python-for-data-analysis/cover_hu_75d5f95a55813323.webp 1x,
                  /resources/books/python-for-data-analysis/cover_hu_32e4dfe9a87340bd.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/python-for-data-analysis/cover_hu_7d469a3e1c61d4ed.jpg"
          srcset="/resources/books/python-for-data-analysis/cover_hu_7d469a3e1c61d4ed.jpg 1x,
                  /resources/books/python-for-data-analysis/cover_hu_ddcd88b0b074d5df.jpg 2x"
          alt="Python for Data Analysis"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>August 2022</span>
          
        
        
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Python for Data Analysis</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Data Wrangling with pandas, NumPy, and Jupyter</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/images/person-placeholder.svg"
          alt="Wes McKinney"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Wes McKinney</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Data Wrangling
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
  
    
  







  





  
  






  





  
  
    
  


  


















































<div id="item-62bb33a8b91dab9172da0bcdeff97fd5" class="@container h-full">
  <a href="https://opensource.posit.co/resources/books/mastering-shiny/" title="Mastering Shiny"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #476D74 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/mastering-shiny/cover_hu_668f7eec9e81d5e5.webp 1x,
                  /resources/books/mastering-shiny/cover_hu_ffbffdee9453158a.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/mastering-shiny/cover_hu_1aab624c519350c5.jpg"
          srcset="/resources/books/mastering-shiny/cover_hu_1aab624c519350c5.jpg 1x,
                  /resources/books/mastering-shiny/cover_hu_133479afee483ad4.jpg 2x"
          alt="Mastering Shiny"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/mastering-shiny/cover_hu_ffbffdee9453158a.webp 1x,
                  /resources/books/mastering-shiny/cover_hu_94cd77a590183072.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/mastering-shiny/cover_hu_133479afee483ad4.jpg"
          srcset="/resources/books/mastering-shiny/cover_hu_133479afee483ad4.jpg 1x,
                  /resources/books/mastering-shiny/cover_hu_992d98d506947be9.jpg 2x"
          alt="Mastering Shiny"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/mastering-shiny/cover_hu_94cd77a590183072.webp 1x,
                  /resources/books/mastering-shiny/cover_hu_f33d2ce98fef70bf.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/mastering-shiny/cover_hu_992d98d506947be9.jpg"
          srcset="/resources/books/mastering-shiny/cover_hu_992d98d506947be9.jpg 1x,
                  /resources/books/mastering-shiny/cover_hu_a9d31e479d4513b0.jpg 2x"
          alt="Mastering Shiny"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>April 2021</span>
          
        
        
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Mastering Shiny</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Build Interactive Apps, Reports, and Dashboards Powered by R</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/hadley-wickham/profile.jpg"
          alt="Hadley Wickham"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Hadley Wickham</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Shiny
              </span>
            
              <span class="pill">
                Interactive Apps
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
  
    
  







  





  
  






  





  
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  


  


















































<div id="item-82f304d0f0b38b90dde329272b0a8d87" class="@container h-full">
  <a href="https://opensource.posit.co/resources/books/tidy-modeling-with-r/" title="Tidy Modeling with R"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #A16B2D 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_e93a1cc5d3b5a9d.webp 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_a3c22580d7e8e881.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/tidy-modeling-with-r/cover_hu_d315444941b9cb7f.jpg"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_d315444941b9cb7f.jpg 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_525fe199315f9c2b.jpg 2x"
          alt="Tidy Modeling with R"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_a3c22580d7e8e881.webp 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_cd1393df6994af7e.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/tidy-modeling-with-r/cover_hu_525fe199315f9c2b.jpg"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_525fe199315f9c2b.jpg 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_664a9d51be93be07.jpg 2x"
          alt="Tidy Modeling with R"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_cd1393df6994af7e.webp 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_c6fa8553b72c4f19.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/tidy-modeling-with-r/cover_hu_664a9d51be93be07.jpg"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_664a9d51be93be07.jpg 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_978aaeb6d2b325ec.jpg 2x"
          alt="Tidy Modeling with R"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>July 2022</span>
          
        
        
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Tidy Modeling with R</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">A Framework for Modeling in the Tidyverse</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/max-kuhn/max_harkness_sq.jpg"
          alt="Max Kuhn"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ><img
          src="https://opensource.posit.co/people/julia-silge/profile.jpg"
          alt="Julia Silge"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white -ml-2"
          style="z-index: 9;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Max Kuhn,&nbsp;Julia Silge</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                tidymodels
              </span>
            
              <span class="pill">
                recipes
              </span>
            
              <span class="pill">
                parsnip
              </span>
            
              <span class="pill">
                rsample
              </span>
            
              <span class="pill">
                tune
              </span>
            
              <span class="pill">
                yardstick
              </span>
            
              <span class="pill">
                workflows
              </span>
            
              <span class="pill">
                Machine Learning
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
</div>


<h2 id="showcases-from-the-community">Showcases from the community
</h2>









  
  
    
  

  
  
    
  





  


<div class="grid gap-12 items-start mt-12 md:grid-cols-2 ">
  
  
    
    
    
      <div class="prose max-w-none "><p><a href="https://opensource.posit.co/people/samuel-bharti/" target="_blank" rel="noopener">Samuel Bharti</a> spent the summer on the Shiny team and built 10 open-source applications and 5 packages for computational biology, plus a reusable layer that grew underneath them. It&rsquo;s a great read if you&rsquo;re curious about genomics, LLM-powered apps, or building a whole ecosystem of Shiny tools.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/" target="_blank" rel="noopener">Genomes, Prompts, and Shiny: What I Built During My Summer at Posit</a> blog post.</li>
</ul></div>
    
  
    
    
    
      <div class="prose max-w-none "><div class="not-prose"><figure>
      <img class="h-auto max-w-full rounded-lg"
        src="https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/images/genomes-shiny.png"
        alt="Genomes, Prompts, and Shiny featured image" 
        loading="lazy"
      >
    </figure></div></div>
    
  
</div>










  
  
    
  

  
  
    
  





  


<div class="grid gap-12 items-start mt-12 md:grid-cols-2 ">
  
  
    
    
    
      <div class="prose max-w-none "><div class="not-prose"><figure>
      <img class="h-auto max-w-full rounded-lg"
        src="https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/images/pharmacometrics-vpc.png"
        alt="Visual predictive check plot of prediction-corrected phenobarbital concentration (mg/L) over time (h), with observed data points, solid and dashed percentile lines, and shaded blue prediction intervals rising to a peak near 160 hours and then declining." 
        loading="lazy"
      >
    </figure></div></div>
    
  
    
    
    
      <div class="prose max-w-none "><p>How much medicine is too much for the tiniest patients? Matthew Fidler and Janice Goh use <a href="https://nlmixr2.org/" target="_blank" rel="noopener">nlmixr2</a> in R to model phenobarbital dosing in preterm infants, showing how weight-based dosing keeps nearly all simulated babies within the target range. (It&rsquo;s a teaching example, not dosing guidance!)</p>
<ul>
<li>Read more in the <a href="https://posit.co/blog/pharmacometrics-in-r-posit" target="_blank" rel="noopener">Tiny Doses for Tiny Babies: How much is too much?</a> blog post.</li>
</ul></div>
    
  
</div>

<p>If you&rsquo;re on LinkedIn, be sure to follow and tag <a href="https://www.linkedin.com/showcase/posit-open-source/" target="_blank" rel="noopener">Posit Open Source</a> for us to share the amazing things you&rsquo;re working on!</p>
<h2 id="upcoming-events">Upcoming events
</h2>
<p>Join us for our ongoing virtual events:</p>
<ul>
<li><a href="https://pos.it/dsh" target="_blank" rel="noopener">Data Science Hangout</a> for casual conversations with leaders in the data space</li>
<li><a href="https://pos.it/dslab" target="_blank" rel="noopener">Data Science Lab</a> for live coding sessions with practitioners building cool things with code</li>
</ul>
<p>Mark your calendars: Josh Starmer of StatQuest is joining us on December 17th for this year&rsquo;s Data Science Hangout season finale! In the meantime, catch his session <a href="https://www.youtube.com/live/u_9OA3WRHgo?t=2244s" target="_blank" rel="noopener">teaching Naive Bayes with Positron and Posit Assistant</a>.</p>
<p>Want to know where else you can find Posit folks? Check out our <a href="https://opensource.posit.co/events/" target="_blank" rel="noopener">events page</a> for upcoming conferences, meetups, and more.</p>
<p>Hope to see you there!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/thumbnail.jpg" length="68574" type="image/jpeg" />
    </item>
    <item>
      <title>All Together Now: Concurrent Async in Shiny for Python</title>
      <link>https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/</link>
      <pubDate>Thu, 29 Oct 2026 00:03:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/</guid>
      <dc:creator>Josh Taillon</dc:creator>
      <dc:creator>Barret Schloerke</dc:creator><description><![CDATA[<p><a href="https://pypi.org/project/shiny/" target="_blank" rel="noopener">Shiny for Python 1.9</a> overhauls how the reactive system runs async code, and now uses a concurrency model similar to Shiny for R. This post explains what changed, and shows how much faster an app gets when it awaits slow work. The key changes:</p>
<ul>
<li><a href="#one-slow-user-no-longer-blocks-everyone">A slow <code>await</code> in one session no longer blocks other sessions</a>, so individual users of an app no longer wait for each other.</li>
<li><a href="#async-outputs-run-at-the-same-time">Async outputs in the same session now run concurrently</a>, so a page&rsquo;s slow outputs run in parallel rather than serially.</li>
<li><a href="#reactivelock-is-deprecated"><code>reactive.lock()</code> is deprecated</a>, and the new <a href="#new-run_once_when_idle"><code>session.run_once_when_idle()</code></a> provides a way to change reactive state from a background task.</li>
</ul>
<p>These changes only affect <code>async</code> code. Your app still runs on one thread with a single <code>asyncio</code> event loop, and synchronous
code still blocks other sessions (see <a href="#concurrency-needs-await">Concurrency needs <code>await</code></a>). The difference is that an async
task now waits for slow work without blocking other tasks, in its own session or in others.</p>
<p>Before 1.9, one lock for the whole process serialized all reactive updates. The lock made sure that an input could not
change while an output that read it was still computing. In 1.9, the lock is gone, and instead each session sends its
outputs before it applies that user&rsquo;s next input, the same model as Shiny for R.
Within that rule, the reactive system starts each effect as its own task and moves on. While one session awaits a query, the
event loop is free to run other tasks, making the app more responsive for everyone.</p>
<h2 id="one-slow-user-no-longer-blocks-everyone">One slow user no longer blocks everyone
</h2>
<p>Until now, Shiny for Python processed reactivity behind one lock for the whole process, <code>reactive.lock()</code>. When a user&rsquo;s action invalidated an effect or an output, Shiny took the lock, ran everything that was invalidated, and released the lock only when all of it had finished. This model meant that any other reactive effects were blocked for as long as an operation kept the lock. During that time, no other session in the process (<em>e.g.</em>, a separate tab or another user) could update anything, not even an output that had nothing to do with the query.</p>
<p>The recording below shows an example of how the new system improves things drastically. It simulates four people using the same app each in a separate Shiny session. Alice, Bob and Carol each click &ldquo;Run report&rdquo; at the same time. A report has two async outputs, &ldquo;Sales&rdquo; and &ldquo;Forecast&rdquo;, and each one takes two seconds to finish query. Dan only watches a chart that the server redraws every 0.2 seconds. The plot at the bottom displays the <a href="https://shiny.posit.co/py/docs/opentelemetry.html" target="_blank" rel="noopener">OpenTelemetry spans</a> for the app to visualize the timeline of server processing.</p>
<p>Each user&rsquo;s card shows the status of their two outputs: a hand while the output waits its turn, a spinner while it runs, and a check when it is done. Under the button, the time since the click is split into three parts that add up to the total: how long the report <em>waited</em> before its first output started, how long its outputs <em>computed</em>, and how long the session was <em>blocked</em> afterwards, before its chart could update again.</p>
<h3 id="before-19">Before 1.9
</h3>
<figure>
<img src="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/before.gif" data-fig-alt="Shiny for Python 1.8: three users click Run report at the same time. Alice&#39;s report computes for 4 seconds and is then blocked for 8 seconds. Bob waits for 4 seconds, computes for 4, and is blocked for 4. Carol waits for 8 seconds and computes for 4. Dan&#39;s chart is blocked for 12 seconds. In the timeline, the six output spans form a staircase, one after another." alt="Shiny for Python 1.8. Because of the reactive.lock(), the reports run one after another and finish after 4, 8 and 12 seconds. Even within one report, Forecast waits for Sales to finish. Every live chart stops updating until the last report is done. In the OpenTelemetry timeline, the six output spans form a staircase, one after another." />
<figcaption aria-hidden="true"><strong>Shiny for Python 1.8.</strong> Because of the <code>reactive.lock()</code>, the reports run one after another and finish after 4, 8 and 12 seconds. Even within one report, Forecast waits for Sales to finish. Every live chart stops updating until the last report is done. In the OpenTelemetry timeline, the six output spans form a staircase, one after another.</figcaption>
</figure>
<h3 id="after-19">After 1.9
</h3>
<figure>
<img src="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/after.gif" data-fig-alt="Shiny for Python 1.9: three users click Run report at the same time. Every report waits 0 seconds, computes for 2 seconds, and is blocked for 0 seconds. Dan&#39;s chart keeps moving. In the OpenTelemetry timeline, all six output spans start and end together." alt="Shiny for Python 1.9. Because reactive effects are now allowed to run concurrently, both outputs of every report run at the same time, all three reports finish after 2 seconds, and Dan’s chart keeps updating during the slow operations." />
<figcaption aria-hidden="true"><strong>Shiny for Python 1.9.</strong> Because reactive effects are now allowed to run concurrently, both outputs of every report run at the same time, all three reports finish after 2 seconds, and Dan’s chart keeps updating during the slow operations.</figcaption>
</figure>
<p>In 1.8, the OpenTelemetry data shows the six output spans forming a staircase. Alice&rsquo;s &ldquo;Forecast&rdquo; waits for her own &ldquo;Sales&rdquo;, and Bob&rsquo;s report can&rsquo;t start until Alice&rsquo;s ends. No session redraws its chart (the green ticks) until the last report is done. In 1.9, all six async outputs run at the same time, and Dan&rsquo;s chart never stops updating.</p>
<p>In 1.9, a reactive flush starts each invalidated effect as an asynchronous task and the reactive system doesn&rsquo;t wait for it to finish to continue processing events. While Alice&rsquo;s report awaits its query, the event loop is free to serve Bob, Carol, Dan, and everyone else.</p>
<figure>
<img src="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/how-it-works.svg" data-fig-alt="Diagram in two panels. The top panel, Shiny 1.8, shows Alice holding one lock for the whole app while Bob and Carol wait for it. Behind the lock, in a box labeled Global queue, six outputs run in a single line: Alice&#39;s Sales, Alice&#39;s Forecast, Bob&#39;s Sales, Bob&#39;s Forecast, Carol&#39;s Sales, and Carol&#39;s Forecast. The bottom panel, Shiny 1.9, shows three separate sessions for Alice, Bob and Carol side by side. In each one, the user&#39;s click starts Sales and Forecast at the same time, inside a box labeled Per-session tasks, both feed into one step that sends both outputs together, and then the user&#39;s next input is applied. A note says that all six async outputs run at the same time, and that each session applies its next input only after it sends its outputs, so inputs never change halfway through." alt="How a report runs in each version. In 1.8, every user waits for one lock, so the six async outputs run one after another. In 1.9, each session has its own tasks, which start at the same time. The session sends their outputs together, and only then applies that user’s next input." />
<figcaption aria-hidden="true">How a report runs in each version. In 1.8, every user waits for one lock, so the six async outputs run one after another. In 1.9, each session has its own tasks, which start at the same time. The session sends their outputs together, and only then applies that user’s next input.</figcaption>
</figure>
<p>The more users that click at the same time, the larger the difference:</p>
<figure>
<img src="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/sessions.png" data-fig-alt="Line chart. With Shiny for Python 1.8, the wait for the last user grows by 4 seconds for each user, up to 32 seconds for 8 users. With 1.9, it stays at 2 seconds for any number of users." alt="The time until the last user sees a result, when several users click at the same time. Each report has two async outputs that await a two-second query." />
<figcaption aria-hidden="true">The time until the last user sees a result, when several users click at the same time. Each report has two async outputs that await a two-second query.</figcaption>
</figure>
<p>Put in terms of scaling: when <em>n</em> users each start <em>k</em> async outputs that each wait <em>t</em> seconds, the last user in 1.8 waits about <em>n</em> × <em>k</em> × <em>t</em> seconds, because every output runs after the one before it. In 1.9, every user waits about <em>t</em> seconds, for any number of users and outputs. The wait goes from $O(n \cdot k)$ to $O(1)$. In the chart, <em>k</em> is 2 and <em>t</em> is 2 seconds, so for 8 users the wait goes from 32 seconds to 2.</p>
<p><em>Caveat:</em> this speedup applies when the slow part is waiting on something outside Python that can serve many requests at the same time, such as a database or a web API. Work that keeps Python itself busy will still add up (see <a href="#concurrency-needs-await">Concurrency needs <code>await</code></a> below).</p>
<h2 id="async-outputs-run-at-the-same-time">Async outputs run at the same time
</h2>
<p>Apart from the cross-session benefits, the updated reactive system also improves things for a single user, as Alice&rsquo;s two outputs show in the recording above. Before, a flush ran the outputs of a session one after another, so a page with several slow <code>async</code> outputs added up their times. Now they all start together and the page updates once all the updates are ready.</p>
<p>In this example, there are three outputs and each one waits for a one-second query. The app then shows how long after the click it was ready:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">asyncio</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">time</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny</span> <span class="kn">import</span> <span class="n">reactive</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny.express</span> <span class="kn">import</span> <span class="nb">input</span><span class="p">,</span> <span class="n">render</span><span class="p">,</span> <span class="n">ui</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">ui</span><span class="o">.</span><span class="n">input_action_button</span><span class="p">(</span><span class="s2">&#34;refresh&#34;</span><span class="p">,</span> <span class="s2">&#34;Refresh dashboard&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@reactive.calc</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">refreshed_at</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="nb">input</span><span class="o">.</span><span class="n">refresh</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="n">time</span><span class="o">.</span><span class="n">perf_counter</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">def</span> <span class="nf">query</span><span class="p">(</span><span class="n">name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="n">start</span> <span class="o">=</span> <span class="n">refreshed_at</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">    <span class="k">await</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>  <span class="c1"># Stands in for a one-second database query.</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="sa">f</span><span class="s2">&#34;</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2"> ready after </span><span class="si">{</span><span class="n">time</span><span class="o">.</span><span class="n">perf_counter</span><span class="p">()</span> <span class="o">-</span> <span class="n">start</span><span class="si">:</span><span class="s2">.1f</span><span class="si">}</span><span class="s2">s&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@render.text</span>
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">def</span> <span class="nf">revenue</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="k">await</span> <span class="n">query</span><span class="p">(</span><span class="s2">&#34;Revenue&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@render.text</span>
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">def</span> <span class="nf">signups</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="k">await</span> <span class="n">query</span><span class="p">(</span><span class="s2">&#34;Signups&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@render.text</span>
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">def</span> <span class="nf">churn</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="k">await</span> <span class="n">query</span><span class="p">(</span><span class="s2">&#34;Churn&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p><a href="https://shinylive.io/py/editor/#code=NobwRAdghgtgpmAXAAjFADugdOgnmAGlQGMB7CAFzkqVQEsZ1SAnC5KAZ1wmLtIB0IDJq2QUGcQYIBmzUjGQcAFnQi5kwlm2ZwoxcQDdJEWfMUq1WOAA90Ojhw2MtGiOgCuFIjogATOMxE7nRSEMFYqh4UAPp64uTRAEaeFOQAFPxgOrJwyplEmQBKcDnKyL6cSomkUMy&#43;mQCUoYIAAjpxdEZYxFAANsSC-tLI2fZKcL6xFGkNiILIC65RWKO5SjPzizoU7swQYhI4AdLRZO6UARsQoZzcxOUlyACO7gG4adDwKBwUzA3IAFoAHyKX5zfaLH61NgAXhGJTGEymV0W7AA7lA6Gxbjw&#43;FgOL04HB0GkAIz-ZAAYmQAGUKFA-I5VMhpCx2MhyHAARw4GQ-OUoPTEpw4M9XsxcFhNgttrt9tJMiBPnAAL7wqC&#43;dRQaRUZjIEDieBHZgnM4XZgzQGg6GILCk6QqjiZZoQNrUfzMLBUawUQQ4&#43;5DeFGMJwGbg1GyvbozFsF5vDJgYrB16NF1uvwBL02X3QLg8B7DDh0ADmYXQHDD0vhOyjUAxWLF8cyNJLZadYCa1y76Y9WZ9frzAcexCUcsrEJlcBr&#43;zrMcbEoTAGFR3tUxBCKgKLh0AgUGBvRQwCqALpAA" target="_blank" rel="noopener">Open this app in Shinylive</a> to run it in your browser and edit it.</p>
<p>In 1.8, the outputs are ready one at a time, after 1.0, 2.0 and 3.0 seconds, and none of them render until the last one is done at 3.0s. In 1.9, all three are ready after 1.0 second.</p>
<figure>
<img src="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/outputs.png" data-fig-alt="Line chart. With Shiny for Python 1.8, the time grows by one second for each output, up to 12 seconds for 12 outputs. With 1.9, it stays at 1 second for any number of outputs." alt="The time until every output is rendered, for a page of async outputs that each take one second." />
<figcaption aria-hidden="true">The time until every output is rendered, for a page of async outputs that each take one second.</figcaption>
</figure>
<h2 id="concurrency-needs-await">Concurrency needs <code>await</code>
</h2>
<div class="callout callout-important" role="note" aria-label="Important">
<div class="callout-header">
<span class="callout-title">Blocking code still blocks every session</span>
</div>
<div class="callout-body">
<p>Shiny runs on a single <a href="https://docs.python.org/3/howto/a-conceptual-overview-of-asyncio.html#event-loop" target="_blank" rel="noopener"><code>asyncio</code> event loop</a>. Code can only run concurrently while other code awaits. A synchronous call such as <code>time.sleep()</code>, a blocking database driver, or a long calculation still stops every session until it returns, in both 1.8 and in 1.9.</p>
</div>
</div>
<p>The recommended way to run slow work is an <a href="https://shiny.posit.co/py/docs/nonblocking.html" target="_blank" rel="noopener">extended task</a>. It runs in the background, outside the session&rsquo;s reactive cycle, so the user can keep using the app while it runs. It also gives you the task&rsquo;s status, a way to cancel it, and a button that shows when the task is busy. Inside the task, call an async library, or run a blocking call in a thread with <a href="https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread" target="_blank" rel="noopener"><code>asyncio.to_thread()</code></a>:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="nd">@ui.bind_task_button</span><span class="p">(</span><span class="n">button_id</span><span class="o">=</span><span class="s2">&#34;go&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nd">@reactive.extended_task</span>
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">def</span> <span class="nf">run_query</span><span class="p">(</span><span class="n">filters</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="k">await</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">to_thread</span><span class="p">(</span><span class="n">run_slow_query</span><span class="p">,</span> <span class="n">filters</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@reactive.effect</span>
</span></span><span class="line"><span class="cl"><span class="nd">@reactive.event</span><span class="p">(</span><span class="nb">input</span><span class="o">.</span><span class="n">go</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">_</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="n">run_query</span><span class="p">(</span><span class="nb">input</span><span class="o">.</span><span class="n">filters</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@render.data_frame</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">results</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="n">run_query</span><span class="o">.</span><span class="n">result</span><span class="p">()</span></span></span></code></pre></div></div>
<p>For lower-level control, you can await <code>asyncio.to_thread()</code> directly in an output. This keeps the event loop free, so other sessions keep going, but it doesn&rsquo;t have the extended task&rsquo;s features: there is no status, no way to cancel, and the output is part of the session&rsquo;s cycle, so the session sends its other outputs and applies its next input only after the call returns.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="nd">@render.data_frame</span>
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">def</span> <span class="nf">results</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="k">await</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">to_thread</span><span class="p">(</span><span class="n">run_slow_query</span><span class="p">,</span> <span class="nb">input</span><span class="o">.</span><span class="n">filters</span><span class="p">())</span></span></span></code></pre></div></div>
<h2 id="what-stays-the-same">What stays the same
</h2>
<p>Within one session, Shiny keeps the guarantees that make reactive code easy to reason about. These match how Shiny works in R as well:</p>
<ul>
<li><strong>Inputs don&rsquo;t change in the middle of a cycle.</strong> If a user changes an input while the session&rsquo;s effects are still running, Shiny applies the change only when all of them have finished. An effect that pauses at an <code>await</code> sees the same input values when it resumes. Timers from <code>reactive.invalidate_later()</code> wait the same way.</li>
<li><strong>Outputs update together.</strong> A session sends all of its new output values at once, when its effects have finished, so the page never shows a mix of old and new results.</li>
<li><strong>An effect never overlaps itself.</strong> If an effect is invalidated while it runs, the next run starts when the current run ends.</li>
</ul>
<h2 id="changes-you-might-notice">Changes you might notice
</h2>
<p>Most apps won&rsquo;t need any changes, but here are some differences that you might see:</p>
<ul>
<li><strong>Async effects interleave.</strong> Effects in the same session now run in turns at each <code>await</code>, instead of one after another. <code>priority</code> sets the order in which effects <em>start</em>, not the order in which they finish. If one effect depends on another effect&rsquo;s side effect, use a <code>reactive.calc</code> or a <code>reactive.value</code> to make the dependency explicit. (<a href="https://github.com/posit-dev/py-shiny/issues/837" target="_blank" rel="noopener">#837</a>)</li>
<li><strong>Destroying an effect cancels it.</strong> Because Shiny no longer waits for async effects to finish, a session can end, or a module can be destroyed, while one of its effects is paused at an <code>await</code>. So <code>effect.destroy()</code>, the end of a session, and <code>session.destroy()</code> for a module now cancel a run that is still in progress, by raising <code>asyncio.CancelledError</code> at its current <code>await</code>. This stops the effect before it can read values that were destroyed with its module. If an effect needs to clean up, catch <code>asyncio.CancelledError</code> (or use <code>try</code>/<code>finally</code>) and then let the error continue.</li>
<li><strong>Message handlers run in their own tasks.</strong> In 1.8, Shiny ran a <code>session.set_message_handler()</code> handler before it read the next message from the client, and it kept the global lock while the handler ran. So a slow handler delayed the client&rsquo;s other messages, and every other session as well. Now each handler runs in a task of its own, and the session keeps handling messages while it runs.</li>
<li><strong>Setting a value schedules a flush.</strong> Setting a <code>reactive.value</code> now schedules a flush on its own (<a href="https://github.com/posit-dev/py-shiny/issues/21" target="_blank" rel="noopener">#21</a>). So a value set from a download handler updates the outputs that read it right away, even while a streamed download is still sending (<a href="https://github.com/posit-dev/py-shiny/issues/1785" target="_blank" rel="noopener">#1785</a>). The reactive graph is still not thread-safe, so from another thread, use <code>loop.call_soon_threadsafe(value.set, new_value)</code>.</li>
<li><strong>UI updates from outside the reactive graph reach the browser.</strong> A <code>ui.update_*()</code> call made outside the reactive graph&rsquo;s execution, for example from a background <code>asyncio</code> task, is now sent to the client right away, instead of waiting for the next input change (<a href="https://github.com/posit-dev/py-shiny/issues/21" target="_blank" rel="noopener">#21</a>, <a href="https://github.com/posit-dev/py-shiny/issues/1889" target="_blank" rel="noopener">#1889</a>).</li>
<li><strong>OpenTelemetry spans follow the session.</strong> There is now one <code>reactive_update</code> span for each session&rsquo;s cycle, as in Shiny for R. It has the session&rsquo;s <code>session.id</code>, and the session&rsquo;s calc, effect and output spans are its children.</li>
</ul>
<h2 id="reactivelock-is-deprecated"><code>reactive.lock()</code> is deprecated
</h2>
<p>Shiny itself no longer uses <code>reactive.lock()</code>, and in 1.9 it no longer does anything. Calling it emits a <code>ShinyDeprecationWarning</code> and returns a lock that never blocks. The <code>reactive.lock()</code> API will be completely removed in a future version of Shiny for Python.</p>
<p>The usual reason to use it was to change reactive state from a background task, followed by a flush. You can now just set the value directly, and Shiny will schedule the flush for you:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># Before</span>
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">with</span> <span class="n">reactive</span><span class="o">.</span><span class="n">lock</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="n">latest</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">new_value</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">await</span> <span class="n">reactive</span><span class="o">.</span><span class="n">flush</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># After</span>
</span></span><span class="line"><span class="cl"><span class="n">latest</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">new_value</span><span class="p">)</span></span></span></code></pre></div></div>
<p>If your code used <code>reactive.lock()</code> to keep two pieces of your own code from running at the same time, create your own <a href="https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock" target="_blank" rel="noopener"><code>asyncio.Lock</code></a> for that.</p>
<h2 id="new-run_once_when_idle">New: <code>run_once_when_idle()</code>
</h2>
<p>Sometimes a change should wait until a session&rsquo;s running effects have finished, the same way input changes from the browser do. <a href="https://shiny.posit.co/py/api/core/Session.html#shiny.Session.run_once_when_idle" target="_blank" rel="noopener"><code>session.run_once_when_idle()</code></a> runs a function once, at the start of the session&rsquo;s next cycle:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">session</span><span class="o">.</span><span class="n">run_once_when_idle</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="n">latest</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">new_value</span><span class="p">))</span></span></span></code></pre></div></div>
<p>The function runs when all of the session&rsquo;s effects have finished and its outputs have been sent. If the session is idle already, it runs on the next pass of the event loop.</p>
<h2 id="try-it-yourself">Try it yourself
</h2>
<p><a href="https://shinylive.io/py/app/#code=NobwRAdghgtgpmAXAAjFADugdOgnmAGlQGMB7CAFzkqVQB0wGmIB5COZDdIgM1IFcATsn4BnOINEooyACZwYpZKR7IAFqQDuyAMpqAlhFzI&#43;wgAq4KGiMgCMWAJzJB-CKM6jcEYsjLysdBCBACpqHOhQAOYcUBTIDAD0DMiiGprufELI6HCk6AA2HGKGkchWMZhEcFDEasiGnDb6PIKwcESiStW1yuyB&#43;u4y4hGtVClwoqL65PU25SltyBZWM&#43;iCpMQToljIAIL5&#43;ptEAEKkAEaNssgAwlDr&#43;c6unIGCcOikgnGa&#43;lZlmkoCCjofgUUREBiiKCFUTJKAQK4MUxwYhQUQUBg7ACiNTqgOBcSgmigPxhEAABqivMRplhRIU3gAKAAimIAMrsAJoASjJRAaBRqHBUnBS&#43;S0cliUDOqI4AEd&#43;BJcDsmXDevljESKLUJs8IAcAG4cWp3OJWWJlMLjQSG4T8dCyWI6uA24wABiwACZtoFAsc4EjdAYjHZHEQZDx8mI6i43L0hSD8ZwCWV9PAiGc4EGrvM1hstgBab7yQJk141Cj6Q1YMXEADWDJ5OwA6mE5parK8OK93p93GiTWVSNFyoIiOVjDxDAM6lAeFRhAAWMGBAAcg3hdi9YY3KogAHJ3MbPikKHl3K4Kw8oQ9heUYCYp6kdgB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OhizUs0sJ9ABWFKc3lEOmhDeNPHja5KuarlBVRNKeS2swVVhT8tTOKnmuxnHHbmT55WTtlmBlWYIn7Yz2Vhg9BgOEdkslgOTHwu4ZTaokQ5vkJRH0AAOeCGA4TjJ9lWwUAEAFrBgAPcHmY9wHsM8wDww8LIswASliKZP3KJiA4OWG0GekoQPFS5YIAMz0HZ9Gd8Km49HZ0PicfxLzRu4QtOCLkV4AbxVeVnQsfUhsAMAsM0RKuGpV&#43;45FHgE0BkmR1weBRAIA3PkMcaRhPlV0M&#43;VxVbcAJXrki9czmVDUrJUIRZzoVUNRwFwz8JEMxDNk2DEpDK1DrZQGYGHIpkAuABhDoseAyCUYudLjHCnEGOVpB6cRrGcRrsc2k3CD3DRmXCoAHRnXDdQnrU9wRlb5yWJ0IzIMlA2OQQBX0QxMyI6sLIwF3IganOxGAZFCQF3SUXcLOURdHI1iGcj6nEMPhA3Q-lTOUs5GYjysdENYPQDgoiyIe8nIupxAZmVdyILI1I9p0I5iOZM3xVCWELiKYaOGpHyhhiGlwftWfKBVki0FC1SIUGQM5wucKFdNRfkHvZlRflPuPbne5yDDgzacaDdgnoNzESADaAaDXlX4RAxWnQoBG0Cgy4MKAZgxND5TAW0VNawdxHsAFwd0EBsKDNqJ4MOoh2AVggAA" target="_blank" rel="noopener">You can run the four-user demo from above in Shinylive</a> to see the improvements live. In that demo, each of the four panels connects to one Python process as its own Shiny session, simulating four different users accessing one server. Click the &ldquo;Alice, Bob and Carol click &lsquo;Run report&rsquo;&rdquo; button at the top to start three reports at once, and watch the OpenTelemetry timeline as the outputs run. Shinylive uses the latest release of Shiny, so the demo shows the 1.9 behavior; the <a href="#before-19">recording above</a> shows 1.8.</p>
<!-- Before publishing: the Shinylive link is encoded from _examples/four-users/ (in that folder, run `shinylive url encode app.py otel_trace.py requirements.txt --mode app`). Its requirements.txt pins opentelemetry-sdk==1.40.0, to match the opentelemetry-api that Shinylive bundles. After the Shinylive release with Shiny 1.9, check that the demo still starts, and if Shinylive bundles a different opentelemetry-api, update the pin and re-encode the link. -->
<p>To view the spans of your own app, see <a href="https://shiny.posit.co/py/docs/opentelemetry.html" target="_blank" rel="noopener">Shiny&rsquo;s OpenTelemetry docs</a>.</p>
<p>The example apps shown in this post are in the <a href="https://github.com/posit-dev/open-source-website/tree/main/content/blog/shiny-python-concurrent-async/_examples" target="_blank" rel="noopener"><code>_examples/</code> folder</a>. To compare the async changes on your own machine, you can run <code>four-users/app.py</code> with Shiny 1.8, and then with Shiny 1.9.</p>
<h2 id="in-closing">In closing
</h2>
<p>This is one of the largest changes to Shiny for Python&rsquo;s internals since its first release, and it brings Python and R to the same reactive model. The <a href="https://opensource.posit.co/blog/2026-10-29_shiny-python-1-9">Shiny for Python 1.9 release post</a> covers the rest of the release. If an app behaves differently after you upgrade, please let us know! As always, if you have questions or feedback, <a href="https://discord.gg/yMGCamUMnS" target="_blank" rel="noopener">join us on Discord</a> or open an issue on <a href="https://github.com/posit-dev/py-shiny/issues/new" target="_blank" rel="noopener">posit-dev/py-shiny</a>. Happy Shiny-ing!</p>
<!-- Halloween easter egg: once the "In closing" heading scrolls into the top quarter
     of the screen (or the page ends first), a moonlit graveyard rises from the bottom
     of the screen. A skeleton climbs up behind the headstone of reactive.lock() and
     waves, jack-o'-lanterns pop out of the ground, and bats cross the moon. It plays
     once per page view, is skipped for readers who prefer reduced motion, and a click
     the close button, or the Escape key dismisses it. -->
<script>
(function () {
  if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;

  const DURATION = 8500;
  const BONE = "#ECE5D3";
  const BONE_EDGE = "#6B6352";
  const NIGHT = "#0E0A19";
  const STONE = "#1B1429";
  const RIM = "rgba(244, 236, 210, 0.16)";

  // The scene is one SVG in a 1600x420 coordinate system, anchored to the bottom
  // center of the viewport, so narrow screens crop the edges and keep the
  // headstone and the jack-o'-lanterns around it.
  const strokes = (paths, width, color) => paths
    .map((d) => `<path d="${d}" fill="none" stroke="${color}" stroke-width="${width}" stroke-linecap="round"/>`)
    .join("");
  const bones = (paths, width) => strokes(paths, width + 3, BONE_EDGE) + strokes(paths, width, BONE);

  // Skeleton, in its own coordinates with the center of the skull at (0, 32).
  let spine = "";
  for (let y = 76; y < 240; y += 10) {
    spine += `<rect x="-4.5" y="${y}" width="9" height="7" rx="2.5" fill="${BONE}" stroke="${BONE_EDGE}"/>`;
  }
  const ribs = [];
  for (let i = 0; i < 6; i++) {
    const y = 104 + i * 15, w = 38 - Math.abs(i - 1.5) * 3;
    ribs.push(`M-4 ${y} C${-w} ${y - 4} ${-w - 2} ${y + 12} -6 ${y + 10}`);
    ribs.push(`M4 ${y} C${w} ${y - 4} ${w + 2} ${y + 12} 6 ${y + 10}`);
  }
  const skeleton = `
    <svg x="732" y="136" width="161.5" height="240" viewBox="-80 -14 190 282" overflow="visible">
      ${spine}
      ${bones(["M-2 92 L-50 99", "M2 92 L50 99", "M-50 101 L-60 168", "M50 101 L80 62", ...ribs], 4.5)}
      <g class="spk-forearm">
        ${bones(["M80 62 L92 8"], 4.5)}
        ${bones(["M88 4 L85 -6", "M92 1 L91 -10", "M96 2 L98 -8", "M98 7 L104 1"], 2.4)}
        <circle cx="92" cy="5" r="5.5" fill="${BONE}" stroke="${BONE_EDGE}" stroke-width="1.5"/>
      </g>
      <circle cx="0" cy="32" r="30" fill="${BONE}" stroke="${BONE_EDGE}" stroke-width="1.5"/>
      <path d="M-26 40 C-24 18 24 18 26 40" fill="none" stroke="rgba(107, 99, 82, 0.25)" stroke-width="6"/>
      <rect x="-17" y="50" width="34" height="22" rx="7" fill="${BONE}" stroke="${BONE_EDGE}" stroke-width="1.5"/>
      <rect x="-15" y="48" width="30" height="6" fill="${BONE}"/>
      <ellipse cx="-11" cy="33" rx="8" ry="9" fill="#120C1E"/>
      <ellipse cx="11" cy="33" rx="8" ry="9" fill="#120C1E"/>
      <circle class="spk-eye" cx="-11" cy="34" r="2.4" fill="#FFB347"/>
      <circle class="spk-eye" cx="11" cy="34" r="2.4" fill="#FFB347"/>
      <path d="M0 43 L-4 51 L4 51 Z" fill="#120C1E"/>
      <g stroke="#120C1E" stroke-width="1.3">
        <line x1="-12" x2="12" y1="62" y2="62"/>
        <line x1="-7" x2="-7" y1="58" y2="66"/>
        <line x1="0" x2="0" y1="58" y2="66"/>
        <line x1="7" x2="7" y1="58" y2="66"/>
      </g>
    </svg>`;

  // Four finger bones hooked over the curved top of the headstone, with the tips
  // hanging down its face.
  const stoneTop = (x) => 270 - 50 * Math.sqrt(1 - ((x - 800) / 65) ** 2);
  const grip = [752, 760, 768, 776].map((x, i) => {
    const y = stoneTop(x), drop = 9 + (i === 0 || i === 3 ? 0 : 3);
    return `M${x - 1} ${y - 5} Q${x + 2} ${y - 2} ${x + 1} ${y + drop * 0.5} L${x} ${y + drop}`;
  });

  // Headstone lettering is cut into the stone: a dark edge above each stroke and
  // a pale face below it.
  const epitaph = (dy, fill) => `
    <g transform="translate(0 ${dy})" fill="${fill}" text-anchor="middle" font-family="spk-epitaph, Georgia, serif" font-weight="600">
      <text x="800" y="266" font-size="11" letter-spacing="3.5">HERE LIES</text>
      <text x="800" y="298" font-size="12.5" letter-spacing="0.5">reactive.lock()</text>
    </g>`;
  const headstone = `
    <path d="M735 350 V270 A65 50 0 0 1 865 270 V350 Z" fill="${STONE}" stroke="${RIM}" stroke-width="2"/>
    <path d="M776 277 H824 M800 273.5 l3 3.5 l-3 3.5 l-3 -3.5 Z" stroke="rgba(220, 212, 190, 0.45)" stroke-width="1" fill="rgba(220, 212, 190, 0.45)"/>
    ${epitaph(-0.9, "rgba(0, 0, 0, 0.75)")}${epitaph(0, "rgba(220, 212, 190, 0.68)")}`;

  const graves = `
    <g fill="${STONE}" stroke="${RIM}" stroke-width="1.5">
      <path d="M402 356 V300 A30 26 0 0 1 462 300 V356 Z" transform="rotate(-7 432 356)"/>
      <path d="M1124 360 V316 H1104 V302 H1124 V282 H1138 V302 H1158 V316 H1138 V360 Z" transform="rotate(5 1131 360)"/>
      <path d="M1196 362 V322 A22 18 0 0 1 1240 322 V362 Z"/>
    </g>`;

  let fence = `<path d="M50 316 H330 M50 340 H330" stroke="${NIGHT}" stroke-width="4"/>`;
  for (let x = 54; x <= 326; x += 17) {
    fence += `<path d="M${x} 356 V306 M${x - 4} 308 L${x} 298 L${x + 4} 308 Z" stroke="${NIGHT}" stroke-width="3" fill="${NIGHT}"/>`;
  }

  const tree = strokes(["M1392 340 C1386 296 1398 252 1380 206"], 18, "#140E22")
    + strokes(["M1383 222 C1352 196 1330 190 1300 162", "M1385 212 C1412 182 1442 174 1472 142", "M1381 206 C1378 176 1392 154 1386 118"], 8, "#140E22")
    + strokes(["M1300 162 C1290 150 1286 140 1290 126", "M1328 188 C1316 176 1312 166 1298 160", "M1472 142 C1482 130 1480 120 1494 110", "M1440 172 C1452 168 1462 172 1474 168", "M1386 118 C1380 106 1386 96 1378 86"], 3.5, "#140E22");

  // Jack-o'-lanterns: [x, ground y, scale, delay in ms]. Each one rises out of a
  // clip at its ground line, so it appears to push up out of the earth.
  const lanterns = [[600, 372, 1, 700], [684, 382, 0.7, 860], [936, 378, 1.15, 1020], [1032, 386, 0.72, 1180], [258, 382, 0.85, 1340], [1300, 384, 0.9, 1500]];
  const face = `
    <path d="M-25 -37 L-9 -37 L-17 -50 Z M9 -37 L25 -37 L17 -50 Z M-4 -29 L4 -29 L0 -35 Z
             M-27 -22 Q0 -6 27 -22 Q24 -9 15 -7 L12 -13 L6 -6 L0 -12 L-6 -6 L-12 -13 L-15 -7 Q-24 -9 -27 -22 Z"/>`;
  const pumpkins = lanterns.map(([x, y, s, delay], i) => `
    <clipPath id="spk-ground-${i}"><rect x="${x - 80}" y="${y - 120}" width="160" height="122"/></clipPath>
    <ellipse class="spk-halo" cx="${x}" cy="${y}" rx="${70 * s}" ry="${16 * s}" fill="url(#spk-halo)" style="animation-delay:${delay + 300}ms"/>
    <g clip-path="url(#spk-ground-${i})">
      <g class="spk-pop" style="animation-delay:${delay}ms">
        <g transform="translate(${x} ${y}) scale(${s})">
          <path d="M-3 -58 C-4 -66 0 -72 8 -75 L10 -71 C4 -68 3 -63 4 -58 Z" fill="#3D4A1F"/>
          <g fill="url(#spk-pumpkin)" stroke="rgba(60, 18, 0, 0.6)" stroke-width="1.2">
            <ellipse cx="-19" cy="-30" rx="24" ry="29"/>
            <ellipse cx="19" cy="-30" rx="24" ry="29"/>
            <ellipse cx="0" cy="-31" rx="21" ry="31"/>
          </g>
          <g class="spk-face" fill="#FFD27A" filter="url(#spk-glow)" style="animation-delay:${-i * 370}ms">${face}</g>
        </g>
      </g>
    </g>`).join("");

  let embers = "";
  lanterns.forEach(([x, y, s, delay], i) => {
    for (let j = 0; j < 3; j++) {
      const ex = x + (j - 1) * 18 * s, dur = 2600 + ((i * 3 + j) * 431) % 1400;
      embers += `<circle class="spk-ember" cx="${ex}" cy="${y - 40 * s}" r="${1.4 + (j % 2)}" fill="#FFB347"
        style="animation-duration:${dur}ms; animation-delay:${delay + 600 + j * 520}ms; --drift:${(j - 1) * 14}px"/>`;
    }
  });

  const scene = `
    <svg class="spk-scene" viewBox="0 0 1600 420" preserveAspectRatio="xMidYMax slice">
      <defs>
        <radialGradient id="spk-pumpkin" cx="0.42" cy="0.38" r="0.75">
          <stop offset="0" stop-color="#E9832F"/><stop offset="0.55" stop-color="#A9440F"/><stop offset="1" stop-color="#4A1704"/>
        </radialGradient>
        <radialGradient id="spk-halo">
          <stop offset="0" stop-color="#FF9A3C" stop-opacity="0.55"/><stop offset="1" stop-color="#FF7A1A" stop-opacity="0"/>
        </radialGradient>
        <linearGradient id="spk-far" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stop-color="#2B2145"/><stop offset="1" stop-color="#171026"/>
        </linearGradient>
        <filter id="spk-ink" x="-5%" y="-5%" width="110%" height="110%">
          <feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" seed="7" result="grain"/>
          <feDisplacementMap in="SourceGraphic" in2="grain" scale="2.5"/>
        </filter>
        <filter id="spk-glow" x="-60%" y="-60%" width="220%" height="220%">
          <feGaussianBlur stdDeviation="3.5" result="blur"/>
          <feMerge><feMergeNode in="blur"/><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
        </filter>
      </defs>
      <path d="M0 300 C200 252 400 274 600 244 C800 214 1000 262 1200 232 C1350 210 1500 242 1600 226 V420 H0 Z" fill="url(#spk-far)"/>
      ${tree}
      <g class="spk-climb">${skeleton}</g>
      ${headstone}
      <g class="spk-grip">${bones(grip, 3.4)}</g>
      <path d="M0 352 C250 322 500 348 800 334 C1100 318 1350 348 1600 332 V420 H0 Z" fill="${NIGHT}"/>
      ${graves}${fence}${pumpkins}${embers}
    </svg>`;

  const bat = `
    <svg viewBox="0 0 100 40"><g class="spk-wings">
      <path d="M50 15 C48 11 46 10 44 11 C40 3 26 -1 2 9 C14 11 20 15 22 23 C26 19 32 19 35 25 C38 21 43 22 45 27 L50 33 L55 27 C57 22 62 21 65 25 C68 19 74 19 78 23 C80 15 86 11 98 9 C74 -1 60 3 56 11 C54 10 52 11 50 15 Z M46 12 L45 6 L49 11 Z M54 12 L55 6 L51 11 Z"/>
    </g></svg>`;
  // [top in vh, width in px, crossing time, delay, bob time]; smaller bats are farther away.
  const bats = [[14, 90, 4200, 1100, 900], [24, 62, 5200, 1500, 1100], [9, 44, 6000, 1900, 1300], [30, 120, 3600, 2500, 800], [18, 36, 6400, 2900, 1500]]
    .map(([top, width, cross, delay, bob]) => `
      <div class="spk-bat" style="top:${top}vh; width:clamp(${Math.round(width * 0.55)}px, ${width / 13}vw, ${width}px);
        animation-duration:${cross}ms; animation-delay:${delay}ms; opacity:${0.55 + width / 270}">
        <div class="spk-bob" style="animation-duration:${bob}ms">${bat}</div>
      </div>`).join("");

  const boo = [..."Boo!"]
    .map((ch, i) => `<span style="--tilt:${[-4, 3, -2, 6][i]}deg; animation-delay:${1700 + i * 160}ms">${ch}</span>`).join("");

  // Cinzel and Cinzel Decorative by Natanael Gama and The Cinzel Project Authors,
  // SIL Open Font License 1.1 (https://openfontlicense.org), subset to the letters
  // used here and renamed as the license requires for modified versions.
  const font = (family, weight, data) => `
    @font-face { font-family: ${family}; font-weight: ${weight}; src: url(data:font/woff2;base64,${data}) format("woff2"); }`;
  const css = `${font("spk-epitaph", 600, "d09GMgABAAAAAB0gABAAAAAATJgAABzAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGnwbmiochRYGYD9TVEFUHACBUBEICus011kBNgIkA4I4C4EeAAQgBYNGByAMBxsHQVUHYtg4AGD5jEDy/6cDboiI9EHttgtFUXoyZTUlBiy3jHI7nrqlV0/dPpjHzWvXRjhOcIzfl3lRNxZwOV7hOHx073P+MBxSMZ/Cb/b79cUvdm9Ex8R8igJKXG9HH+qBkjI9U7bzqUu6pMS88CcjJJnlefrlu/O2ZfPzJrP/s6G0JkstTsViDIPQSAZhERqLMAz6LupKSZYdx3HCx/hEPLc8Ak1Lt6lHNGdzd5DkNoZHgAZKEqBogllCTCFKoTRGUKvb/9f+HapiLyL0xaE8T97e35h2m6VxUtYsCDwwjutwzia03Gyrx/BfAkxuYJ2FVhzK4isNgN6n0TClhZTcT0k9RwH8H7lZO5FmhlwVeBGtVIuKJXFyQox3YVu2PXP/9sT/XLPEboQpoAMGvxvVqUTt6zp1THd/X8pc/e9tpu2+XenQtJJDIDuIvZnLEPS0+nt7q9U/abU6EgZYI8tARwbRjFcYAu6MhFWAKo+rEBQNTa/y0mXSVWmxiuvCdRNbVsuGkehNKpIbWb97v59ZYHsqKW45w8GIE5zFERsS37v/+w+jABWARgIJSFKQ5kIeCwUiKJGHiipQTR1qakEdXWjCFDRjBpo1i8zZgLbtQHsqYY5oYM4YYBBY6JpHQ220A2t6+zqAhQEJBMrZ0NMBNKAABSMaMf7BjDEwuWY3xyJtJvIIarNog3teTrwIJuKy7kSmgN/e0sbe4T4NHb2exCjFrD5jgIY+obPPF5dDG7X6AJa7Vn9v44VccpNmMdexcZBclx0gKwhyev18D5DjNXYD0q/ShnqPYE1n19FOcf3DbzQCWnm6s6t74eRpd/MMJvU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MMfFZK1WXESAW/c7PKSvq6f/N1l77CHCVyO0A7/9k/X/3b24m7RZgSwEQ/JK36n29OxMIzKD7jQwc8hfL2mLGEKArJAFQQAgIxgAANnLxpNoBexlmKAbZi0oP56XWkbqilen+r7I2IMVzQRIvGY/DVQA7mFFcOXPhapREuoIupkMhEEUX0YFJasRs5Chm8eRMpIIyyLJQhkTGTEaZxlNwgVQohzIVZAGRSKy48/4RBCYK44m9odBQmgQhgReQzlMIoSvkKIV0mSeUyXlIDLhw5MyZKz/JboAz5zqvRgrmDqqcO/Lgye+1IYCrSraFeh7DRnKuXLhx5cFPsGM8ACzDFeKDrKX9+lIA")}
    #spooky-egg { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; transition: opacity 0.8s ease; }
    #spooky-egg.spk-leaving { opacity: 0; }
    .spk-art { position: absolute; inset: 0; }
    .spk-close {
      position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; padding: 0;
      display: grid; place-items: center; border-radius: 50%; cursor: pointer; pointer-events: auto;
      border: 2px solid #EDE4CC; background: rgba(14, 10, 25, 0.7); color: #EDE4CC;
      animation: spk-fade 0.6s 0.4s ease both; transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    }
    .spk-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
    .spk-close:hover { background: #D2601A; border-color: #D2601A; color: #FFF8EA; }
    .spk-close:focus-visible { outline: 3px solid #D2601A; outline-offset: 3px; }
    #spooky-egg.spk-leaving .spk-scene { transform: translateY(12%); transition: transform 0.8s ease-in; }
    .spk-veil {
      position: absolute; inset: 0;
      background: radial-gradient(ellipse 120% 90% at 50% 30%, rgba(24, 17, 48, 0.8), rgba(11, 7, 25, 0.92) 60%, rgba(6, 4, 16, 0.97));
      -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
      animation: spk-fade 0.9s ease both;
    }
    .spk-moon {
      position: absolute; top: clamp(40px, 9vh, 100px); right: clamp(24px, 11vw, 220px);
      width: clamp(68px, 10vw, 140px); aspect-ratio: 1; border-radius: 50%;
      background:
        radial-gradient(circle at 63% 30%, rgba(160, 140, 100, 0.32) 0 8%, transparent 9%),
        radial-gradient(circle at 34% 60%, rgba(160, 140, 100, 0.28) 0 12%, transparent 13%),
        radial-gradient(circle at 70% 70%, rgba(160, 140, 100, 0.22) 0 6%, transparent 7%),
        radial-gradient(circle at 38% 34%, #FFFAEE, #EFE2BD 55%, #CDB98A);
      box-shadow: 0 0 40px 8px rgba(255, 240, 200, 0.32), 0 0 160px 50px rgba(255, 214, 150, 0.16);
      animation: spk-moon 1.8s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }
    .spk-scene {
      position: absolute; left: 0; bottom: 0; width: 100%; height: clamp(220px, 44vh, 440px);
      animation: spk-rise 1.1s cubic-bezier(0.16, 0.84, 0.24, 1) backwards;
    }
    .spk-fog {
      position: absolute; left: -25%; width: 150%; bottom: 0; height: 30vh; filter: blur(8px);
      background:
        radial-gradient(ellipse 22% 40% at 18% 72%, rgba(196, 186, 232, 0.2), transparent 70%),
        radial-gradient(ellipse 28% 36% at 52% 82%, rgba(196, 186, 232, 0.17), transparent 70%),
        radial-gradient(ellipse 20% 34% at 84% 76%, rgba(196, 186, 232, 0.15), transparent 70%);
      animation: spk-drift 12s linear both, spk-fade 2s 0.5s ease both;
    }
    .spk-fog.spk-back { bottom: 8vh; animation-direction: reverse, normal; opacity: 0.7; }
    .spk-climb { animation: spk-climb 1.3s 1s cubic-bezier(0.3, 1.25, 0.5, 1) backwards; }
    .spk-forearm { transform-origin: 80px 62px; animation: spk-wave 0.55s ease-in-out 2.2s 10 alternate; }
    .spk-grip { animation: spk-fade 0.4s 2s ease both; }
    .spk-eye { animation: spk-candle 1.4s ease-in-out infinite alternate; }
    .spk-pop { animation: spk-pop 0.75s cubic-bezier(0.3, 1.5, 0.5, 1) backwards; }
    .spk-halo { animation: spk-fade 0.6s ease both, spk-candle 1.7s ease-in-out infinite alternate; }
    .spk-face { animation: spk-candle 1.3s ease-in-out infinite alternate; }
    .spk-ember { opacity: 0; animation: spk-ember ease-out infinite; }
    .spk-bat { position: absolute; left: 0; color: #120C1E; animation: spk-fly linear both; }
    .spk-bat svg { display: block; width: 100%; height: auto; fill: currentColor; }
    .spk-bob { animation: spk-bob ease-in-out infinite alternate; }
    .spk-wings { transform-origin: 50px 18px; animation: spk-flap 0.15s ease-in-out infinite alternate; }
    .spk-title {
      position: absolute; left: 50%; top: clamp(60px, 14vh, 160px); transform: translateX(-50%);
      width: min(92vw, 720px); text-align: center;
    }
    .spk-boo {
      display: block; font-family: spk-title, Georgia, serif; font-weight: 900; filter: url(#spk-ink);
      font-size: clamp(72px, 12vw, 150px); line-height: 1; color: #EDE4CC;
      text-shadow: 0.04em 0.035em 0 #D2601A;
    }
    .spk-boo span {
      display: inline-block; transform: rotate(var(--tilt));
      animation: spk-stamp 0.42s cubic-bezier(0.5, 0, 0.75, 0) backwards;
    }
    .spk-sub {
      display: flex; align-items: center; justify-content: center; gap: 0.8em; margin-top: 0.7em;
      font-family: spk-epitaph, Georgia, serif; font-weight: 600; font-size: clamp(14px, 1.9vw, 21px);
      letter-spacing: 0.14em; color: #EDE4CC; animation: spk-fade 0.8s 2.5s ease both;
    }
    .spk-sub::before, .spk-sub::after {
      content: ""; flex: 0 1 64px; height: 5px;
      border-top: 1.5px solid #D2601A; border-bottom: 1.5px solid #D2601A;
    }
    @media (max-width: 600px) {
      .spk-sub::before, .spk-sub::after { display: none; }
      .spk-sub { text-wrap: balance; }
      .spk-moon { top: 20px; right: 76px; width: 56px; }
      .spk-title { top: 17vh; }
    }
    @keyframes spk-fade { from { opacity: 0; } }
    @keyframes spk-rise { from { transform: translateY(100%); } }
    @keyframes spk-moon { from { opacity: 0; transform: translateY(40px) scale(0.92); } }
    @keyframes spk-climb { from { transform: translateY(200px); } }
    @keyframes spk-pop { from { transform: translateY(95px); } }
    @keyframes spk-wave { from { transform: rotate(-20deg); } to { transform: rotate(14deg); } }
    @keyframes spk-candle { 0% { opacity: 1; } 35% { opacity: 0.78; } 55% { opacity: 0.95; } 80% { opacity: 0.7; } 100% { opacity: 0.92; } }
    @keyframes spk-ember {
      0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 0.9; }
      100% { opacity: 0; transform: translate(var(--drift), -150px); }
    }
    @keyframes spk-drift { to { transform: translateX(8%); } }
    @keyframes spk-fly { from { transform: translateX(-15vw); } to { transform: translateX(115vw); } }
    @keyframes spk-bob { from { transform: translateY(-2.5vh) rotate(-4deg); } to { transform: translateY(2.5vh) rotate(5deg); } }
    @keyframes spk-flap { to { transform: scaleY(0.3); } }
    @keyframes spk-stamp { from { opacity: 0; transform: rotate(calc(var(--tilt) * -2)) scale(1.6); } }`;

  function play() {
    const style = document.createElement("style");
    style.textContent = css;
    const egg = document.createElement("div");
    egg.id = "spooky-egg";
    egg.innerHTML = `
      <div class="spk-art" aria-hidden="true">
      <div class="spk-veil"></div>
      <div class="spk-moon"></div>
      ${bats}
      <div class="spk-fog spk-back"></div>
      ${scene}
      <div class="spk-fog"></div>
      <div class="spk-title">
        <span class="spk-boo">${boo}</span>
        <span class="spk-sub">Happy Halloween from the Shiny team!</span>
      </div>
      </div>
      <button type="button" class="spk-close" aria-label="Close the Halloween animation">
        <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 7 L17 17 M17 7 L7 17"/></svg>
      </button>`;
    document.head.appendChild(style);
    document.body.appendChild(egg);

    let done = false;
    function finish() {
      if (done) return;
      done = true;
      egg.classList.add("spk-leaving");
      setTimeout(() => { egg.remove(); style.remove(); }, 800);
      document.removeEventListener("pointerdown", finish);
      document.removeEventListener("keydown", onKey);
    }
    function onKey(event) {
      if (event.key === "Escape") finish();
    }
    egg.querySelector(".spk-close").addEventListener("click", finish);
    document.addEventListener("pointerdown", finish);
    document.addEventListener("keydown", onKey);
    setTimeout(finish, DURATION);
  }

  function onScroll() {
    const heading = document.getElementById("in-closing");
    const pageEnd = window.scrollY + window.innerHeight >= document.documentElement.scrollHeight - 2;
    if ((heading && heading.getBoundingClientRect().top < window.innerHeight * 0.25) || pageEnd) {
      window.removeEventListener("scroll", onScroll);
      play();
    }
  }
  window.addEventListener("scroll", onScroll, { passive: true });
})();
</script>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/feature.gif" length="193148" type="image/gif" />
    </item>
    <item>
      <title>Shiny for Python 1.9</title>
      <link>https://opensource.posit.co/blog/2026-10-29_shiny-python-1-9/</link>
      <pubDate>Thu, 29 Oct 2026 00:02:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-29_shiny-python-1-9/</guid>
      <dc:creator>Barret Schloerke</dc:creator>
      <dc:creator>Josh Taillon</dc:creator>
      <dc:creator>Carson Sievert</dc:creator>
      <dc:creator>Karan Gathani</dc:creator>
      <dc:creator>Shiny Team</dc:creator><description><![CDATA[<p>We&rsquo;re pleased to announce that <a href="https://pypi.org/project/shiny/" target="_blank" rel="noopener">Shiny for Python v1.9</a> is now on PyPI!</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install -U shiny</span></span></code></pre></div></div>
<p>The highlights:</p>
<ul>
<li><a href="#concurrent-async">Async effects and outputs now run concurrently</a>, so one slow <code>await</code> no longer holds up other sessions or other outputs,</li>
<li><a href="#sidebar-landmarks"><code>ui.sidebar(role=)</code></a> makes a sidebar an ARIA landmark that screen reader users can jump to,</li>
<li><a href="#download-buttons-in-express">Express download buttons take an <code>icon</code></a> and other attributes, with no <code>ui.hold()</code> needed, and</li>
<li><a href="#updates-from-background-tasks">UI updates from background tasks</a> now reach the browser right away.</li>
</ul>
<p>This release has a few breaking changes, so please read <a href="#breaking-changes">Breaking changes</a> before you upgrade. Full details are in the <a href="https://github.com/posit-dev/py-shiny/blob/main/CHANGELOG.md" target="_blank" rel="noopener">Shiny for Python changelog</a>.</p>
<h2 id="concurrent-async">Concurrent async
</h2>
<p>The biggest change in 1.9 is under the hood. Until now, one lock for the whole process ran reactive updates one at a time. If an <code>async</code> output awaited a two-second database query, every other session in the process waited too, and so did the other outputs in the same session.</p>
<p>In 1.9 the lock is gone. Shiny starts each invalidated effect as its own task, so while one async output awaits, the event loop is free to run the others:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny.express</span> <span class="kn">import</span> <span class="n">render</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@render.text</span>
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">def</span> <span class="nf">sales</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="k">await</span> <span class="n">db</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="s2">&#34;sales&#34;</span><span class="p">)</span>  <span class="c1"># 2 seconds</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@render.text</span>
</span></span><span class="line"><span class="cl"><span class="k">async</span> <span class="k">def</span> <span class="nf">forecast</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="k">await</span> <span class="n">api</span><span class="o">.</span><span class="n">forecast</span><span class="p">()</span>  <span class="c1"># 2 seconds</span></span></span></code></pre></div></div>
<p>In 1.8, this page took four seconds for one user, and eight seconds for the second of two users who clicked at the same time. In 1.9, both outputs finish after two seconds for everyone. The rest of how a session behaves stays the same: input changes still wait until all of the session&rsquo;s effects have finished, and outputs are still sent together.</p>
<p>There&rsquo;s a lot more to say about this, so it has its own post: <a href="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async">All Together Now: Concurrent Async in Shiny for Python</a>. It covers how the new model works, why concurrency still needs <code>await</code> (synchronous code still blocks every session), and the changes you might notice in an existing app. Two API changes come with it:</p>
<ul>
<li><code>reactive.lock()</code> is now defunct. It no longer locks anything and emits a <code>ShinyDeprecationWarning</code>. Please remove it from your code.</li>
<li>The new <a href="https://shiny.posit.co/py/api/core/Session.html#shiny.Session.run_once_when_idle" target="_blank" rel="noopener"><code>session.run_once_when_idle()</code></a> runs a function once, after the session&rsquo;s effects have finished and its outputs have been sent. Use it to change reactive state from a background task or a custom timer without changing a value that a running effect is still reading.</li>
</ul>
<h2 id="breaking-changes">Breaking changes
</h2>
<p>Besides the concurrency changes above, three changes may need an update to your code or tests:</p>
<ul>
<li><strong>Sidebars render a <code>&lt;div&gt;</code> by default.</strong> <code>ui.sidebar()</code> used to render an <code>&lt;aside&gt;</code>, which is a <a href="https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/complementary.html" target="_blank" rel="noopener">&ldquo;complementary&rdquo; landmark</a>. Now it renders a neutral <code>&lt;div&gt;</code> unless you set <a href="#sidebar-landmarks"><code>role=</code></a>. If your CSS, JavaScript, or tests select <code>aside.sidebar</code>, select <code>.sidebar</code> instead, or set <code>role=&quot;complementary&quot;</code> to keep the <code>&lt;aside&gt;</code>.</li>
<li><strong><code>near_points(add_dist=True)</code> names its column <code>dist_</code>.</strong> The docs always said <code>dist_</code>, but the column was named <code>dist</code>, which could collide with a <code>dist</code> column in your own data. Code that reads <code>df[&quot;dist&quot;]</code> from the result must now read <code>df[&quot;dist_&quot;]</code>.</li>
<li><strong>OpenTelemetry <code>reactive_update</code> spans follow each session.</strong> There is now one span per session cycle, from when the session turns busy until all of its effects (including async ones) have finished, and it carries the session&rsquo;s <code>session.id</code>. Before, one span covered a whole reactive flush, which could serve several sessions. If you have dashboards or alerts built on these spans, check them after you upgrade. Effects without a session no longer have a <code>reactive_update</code> parent.</li>
</ul>
<h2 id="sidebar-landmarks">Sidebar landmarks
</h2>
<p>Screen readers let people jump between the main regions of a page, called <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles#3._landmark_roles" target="_blank" rel="noopener">landmarks</a>, such as the navigation, the main content, and the search form. A sidebar often holds one of these regions, but Shiny had no way to say which one.</p>
<p><a href="https://shiny.posit.co/py/api/core/ui.sidebar.html" target="_blank" rel="noopener"><code>ui.sidebar()</code></a> gains a <code>role</code> argument. Pass <code>&quot;form&quot;</code>, <code>&quot;search&quot;</code>, <code>&quot;complementary&quot;</code>, or <code>&quot;region&quot;</code> to describe what the sidebar is for:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny</span> <span class="kn">import</span> <span class="n">App</span><span class="p">,</span> <span class="n">render</span><span class="p">,</span> <span class="n">ui</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">app_ui</span> <span class="o">=</span> <span class="n">ui</span><span class="o">.</span><span class="n">page_sidebar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">ui</span><span class="o">.</span><span class="n">sidebar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">input_text</span><span class="p">(</span><span class="s2">&#34;query&#34;</span><span class="p">,</span> <span class="s2">&#34;Search penguins&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">input_checkbox_group</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;species&#34;</span><span class="p">,</span> <span class="s2">&#34;Species&#34;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&#34;Adelie&#34;</span><span class="p">,</span> <span class="s2">&#34;Chinstrap&#34;</span><span class="p">,</span> <span class="s2">&#34;Gentoo&#34;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">        <span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="n">title</span><span class="o">=</span><span class="s2">&#34;Filters&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">role</span><span class="o">=</span><span class="s2">&#34;search&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">ui</span><span class="o">.</span><span class="n">output_text</span><span class="p">(</span><span class="s2">&#34;summary&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">title</span><span class="o">=</span><span class="s2">&#34;Penguins&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p>A landmark needs a name, so Shiny labels it with the sidebar&rsquo;s <code>title</code>. The sidebar above renders as:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">div</span> <span class="na">id</span><span class="o">=</span><span class="s">&#34;bslib_sidebar_363556&#34;</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;sidebar&#34;</span> <span class="na">role</span><span class="o">=</span><span class="s">&#34;search&#34;</span>
</span></span><span class="line"><span class="cl">     <span class="na">aria-labelledby</span><span class="o">=</span><span class="s">&#34;bslib_sidebar_363556-title&#34;</span><span class="p">&gt;</span></span></span></code></pre></div></div>
<p>If your sidebar has no title, pass <code>aria_label=</code> or <code>aria_labelledby=</code> instead. Shiny raises an error if a landmark sidebar has no name at all. <code>role=&quot;complementary&quot;</code> renders an <code>&lt;aside&gt;</code>, the other roles render a <code>&lt;div&gt;</code> with that <code>role</code>, and the default (<code>role=None</code>) renders a plain <code>&lt;div&gt;</code>.</p>
<p>Two more accessibility changes come along with this. <code>ui.page_sidebar()</code> now places the whole sidebar layout inside the page&rsquo;s <code>&lt;main&gt;</code> landmark, and navset links now have <code>aria-controls</code> pointing at the tab panel they show. These changes will also be included in the next release of <a href="https://rstudio.github.io/bslib/" target="_blank" rel="noopener">bslib</a> for R.</p>
<h2 id="download-buttons-in-express">Download buttons in Express
</h2>
<p>In Express, <code>@render.download_button</code> places its button for you. That&rsquo;s handy until you want an icon or a different button style, since there was no way to pass those along. The workaround was to wrap the render function in <code>ui.hold()</code> and place a <code>ui.download_button()</code> by hand.</p>
<p>In 1.9, <a href="https://shiny.posit.co/py/api/express/express.render.download_button.html" target="_blank" rel="noopener"><code>@render.download_button</code></a> and <code>@render.download_link</code> take an <code>icon</code> argument, and pass any other keyword arguments to the control they place:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">faicons</span> <span class="kn">import</span> <span class="n">icon_svg</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny.express</span> <span class="kn">import</span> <span class="n">render</span><span class="p">,</span> <span class="n">ui</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">penguins</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="o">...</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">ui</span><span class="o">.</span><span class="n">page_opts</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Penguins&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@render.download_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">label</span><span class="o">=</span><span class="s2">&#34;Download CSV&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">icon</span><span class="o">=</span><span class="n">icon_svg</span><span class="p">(</span><span class="s2">&#34;download&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">class_</span><span class="o">=</span><span class="s2">&#34;btn-success&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">filename</span><span class="o">=</span><span class="s2">&#34;penguins.csv&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">download</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">yield</span> <span class="n">penguins</span><span class="o">.</span><span class="n">to_csv</span><span class="p">(</span><span class="n">index</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@render.data_frame</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">table</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="n">penguins</span></span></span></code></pre></div></div>
<img src="https://opensource.posit.co/blog/2026-10-29_shiny-python-1-9/download-icon.png" alt="A Shiny app titled Penguins shows a green Download CSV button with a download icon, above a table of three penguin species, their islands, and their bill lengths." />
<p>This is part of a wider fix. In Express, <code>@output_args()</code> now accepts every argument of the output&rsquo;s UI function. On a <code>@render.ui</code> output, it accepts <code>inline</code>, <code>container</code>, <code>fill</code>, <code>fillable</code>, and HTML attributes, and on a <code>@render.text</code> output it accepts <code>container</code>, instead of raising a <code>TypeError</code>.</p>
<p>Also, if a download handler sets a reactive value, the outputs and effects that read it now update right away. Before, they waited for the next message from the browser.</p>
<h2 id="updates-from-background-tasks">Updates from background tasks
</h2>
<p>Sometimes an app starts an <code>asyncio</code> task that runs alongside the reactive graph, for example to poll a service or to watch a file. Before 1.9, a <code>ui.update_*()</code> call from such a task sat in a queue until the user next changed an input. In 1.9, it&rsquo;s sent to the browser right away:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">asyncio</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny</span> <span class="kn">import</span> <span class="n">App</span><span class="p">,</span> <span class="n">ui</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">app_ui</span> <span class="o">=</span> <span class="n">ui</span><span class="o">.</span><span class="n">page_fixed</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">ui</span><span class="o">.</span><span class="n">input_text</span><span class="p">(</span><span class="s2">&#34;status&#34;</span><span class="p">,</span> <span class="s2">&#34;Last heartbeat&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">server</span><span class="p">(</span><span class="nb">input</span><span class="p">,</span> <span class="n">output</span><span class="p">,</span> <span class="n">session</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="k">async</span> <span class="k">def</span> <span class="nf">heartbeat</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">        <span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">            <span class="k">await</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">            <span class="n">ui</span><span class="o">.</span><span class="n">update_text</span><span class="p">(</span><span class="s2">&#34;status&#34;</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&#34;%H:%M:%S&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    <span class="n">task</span> <span class="o">=</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">create_task</span><span class="p">(</span><span class="n">heartbeat</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">    <span class="n">session</span><span class="o">.</span><span class="n">on_ended</span><span class="p">(</span><span class="n">task</span><span class="o">.</span><span class="n">cancel</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">app</span> <span class="o">=</span> <span class="n">App</span><span class="p">(</span><span class="n">app_ui</span><span class="p">,</span> <span class="n">server</span><span class="p">)</span></span></span></code></pre></div></div>
<p>The text box now ticks once a second, with no input from the user. If the task needs to change a reactive value instead, wrap the change in <code>session.run_once_when_idle()</code>, described <a href="#concurrent-async">above</a>, so it doesn&rsquo;t change under an effect that is still running.</p>
<h2 id="faster-data-frames">Faster data frames
</h2>
<p><code>@render.data_frame</code> now serializes data frames faster and with less memory. A 100,000-row frame with mixed column types serializes 2 to 3.5 times faster, with a 15 to 40% lower memory peak. The largest gains are for pandas datetime and timedelta columns, duration columns, and <code>Decimal</code> or missing (<code>pd.NA</code>) values. Editing a cell no longer copies the whole data frame. (Thanks, <a href="https://github.com/FBruzzesi" target="_blank" rel="noopener">@FBruzzesi</a>!)</p>
<p>Along the way, values of pandas nullable dtypes (<code>Int64</code>, <code>Float64</code>, <code>boolean</code>) now reach the browser as numbers and booleans instead of strings such as <code>&quot;1&quot;</code> and <code>&quot;True&quot;</code>, so they sort and filter as you would expect. Polars <code>Categorical</code> and <code>Enum</code> columns work with Polars 2.0, and key-value <code>Map</code> columns are labeled as <code>object</code>, like struct and list columns.</p>
<h2 id="deprecation-shiny-add-test">Deprecation: <code>shiny add test</code>
</h2>
<p><code>shiny add test</code>, which generated Playwright tests with an LLM, is deprecated and will be removed within the next few releases. To generate tests, use the bundled <code>shiny-for-python</code> <a href="https://opensource.posit.co/blog/2026-08-04_shiny-r-1-14-python-1-7#agent-skills">Agent Skill</a> with your coding agent instead. The skill also knows about <a href="https://opensource.posit.co/blog/2026-09-22_shiny-python-1-8#in-memory-server-testing">in-memory server tests</a>, which are often all you need.</p>
<h2 id="other-improvements">Other improvements
</h2>
<p>A few more changes worth a quick mention. The full list is in the <a href="https://github.com/posit-dev/py-shiny/blob/main/CHANGELOG.md" target="_blank" rel="noopener">changelog</a>:</p>
<ul>
<li>Message handlers set with <code>session.set_message_handler()</code> now run in their own task, so a slow handler no longer holds up other messages from the client.</li>
<li>Destroying an effect now cancels its in-progress run. So when a session ends, its in-progress <code>async</code> effects and render functions are cancelled instead of running on after the session is gone.</li>
<li><code>req(False, cancel_output=True)</code> inside a <code>@reactive.effect</code> now stops the effect quietly, instead of being treated as an error that closes the session.</li>
<li>On Windows, an output&rsquo;s busy indicator now shows while the output renders.</li>
<li><code>ui.input_date()</code>&rsquo;s <code>datesdisabled</code> now works when <code>format</code> is not the default <code>yyyy-mm-dd</code>.</li>
<li><code>Progress.set(0)</code> now places the bar at <code>0</code> relative to <code>min</code> and <code>max</code>. Before, <code>Progress(min=-10, max=10)</code> showed an empty bar at <code>0</code> instead of a half-full one.</li>
<li><code>near_points()</code> and <code>brushed_points()</code> now handle a categorical column whose categories aren&rsquo;t strings, instead of raising <code>ValueError</code>.</li>
<li>Module bookmarks now find the files that <code>session.bookmark.on_bookmark()</code> saved when the app restores.</li>
<li><code>shiny create</code> now offers the &ldquo;Stream markdown with enterprise LLM&rdquo; templates, which a misspelled path had hidden.</li>
<li><code>Jsonifiable</code> now uses <code>Sequence</code> and <code>Mapping</code>, so values like <code>dict[str, int]</code> and <code>list[str]</code> type-check as JSON-able. (Thanks, <a href="https://github.com/wolfgang-aura" target="_blank" rel="noopener">@wolfgang-aura</a>!)</li>
</ul>
<h2 id="in-closing">In closing
</h2>
<p>We&rsquo;re excited to see what you build with this release. If an app behaves differently after you upgrade, especially around async code, please let us know! As always, if you have questions or feedback, <a href="https://discord.gg/yMGCamUMnS" target="_blank" rel="noopener">join us on Discord</a> or open an issue on <a href="https://github.com/posit-dev/py-shiny/issues/new" target="_blank" rel="noopener">posit-dev/py-shiny</a>. Happy Shiny-ing!</p>
<p>The example apps in this post are in the post&rsquo;s <a href="https://github.com/posit-dev/open-source-website/tree/main/content/blog/shiny-python-1-9/_examples" target="_blank" rel="noopener"><code>_examples/</code> folder</a>.</p>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>A big thank you to all the folks who helped make this release happen by opening issues and contributing code:</p>
<p><a href="https://github.com/cpsievert" target="_blank" rel="noopener">@cpsievert</a>, <a href="https://github.com/faysou" target="_blank" rel="noopener">@faysou</a>, <a href="https://github.com/FBruzzesi" target="_blank" rel="noopener">@FBruzzesi</a>, <a href="https://github.com/fricour" target="_blank" rel="noopener">@fricour</a>, <a href="https://github.com/jat255" target="_blank" rel="noopener">@jat255</a>, <a href="https://github.com/karangattu" target="_blank" rel="noopener">@karangattu</a>, <a href="https://github.com/mmporong" target="_blank" rel="noopener">@mmporong</a>, <a href="https://github.com/pcbeingused333" target="_blank" rel="noopener">@pcbeingused333</a>, <a href="https://github.com/raashish1601" target="_blank" rel="noopener">@raashish1601</a>, <a href="https://github.com/Rodrigo-Palma" target="_blank" rel="noopener">@Rodrigo-Palma</a>, <a href="https://github.com/schloerke" target="_blank" rel="noopener">@schloerke</a>, <a href="https://github.com/taekop" target="_blank" rel="noopener">@taekop</a>, and <a href="https://github.com/wolfgang-aura" target="_blank" rel="noopener">@wolfgang-aura</a>.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-29_shiny-python-1-9/feature.gif" length="164182" type="image/gif" />
    </item>
    <item>
      <title>A deeper Positron integration for Posit Assistant</title>
      <link>https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/</link>
      <pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/</guid>
      <dc:creator>Jonathan McPherson</dc:creator><description><![CDATA[<p>In earlier releases of Positron, Posit Assistant&rsquo;s ability to interact with Positron was mostly limited to the Console and Editor panes. It could run code in Positron, see what that code did, and make changes to your scripts and documents. This alone makes it a powerful data science agent &hellip; but we can do better!</p>
<p>Starting with <a href="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release">this month&rsquo;s release</a> (2026.10), Posit Assistant can now interact with nearly the entire Positron surface. This is less about replacing pointing and clicking with prompts (although you can do a bit of that too) and more about revealing things to Assistant that Positron already knows, giving it more and better context for your questions about your data or Positron itself.</p>
<p>These new features are currently in preview; enable them with the <a href="positron://settings/assistant.previewFeatures">Assistant: Preview Features</a> setting in Positron.</p>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/preview-features.png" data-fig-align="center" data-fig-alt="The Assistant: Preview Features setting in Positron, in the enabled state" />
<p>Enabled? Here are some things you can try:</p>
<h2 id="packages">Packages
</h2>
<p>Assistant can now connect to the same internal data source as Positron&rsquo;s Packages pane. This means that requests to install a package will be fulfilled using the method appropriate to your current Python or R installation (Assistant used to get this wrong, occasionally). It also means you can ask for information about installed packages that Positron adds, such as active CVEs.</p>
<p>Try:</p>
<blockquote>
<p>install the ggplot2 package in Positron</p>
</blockquote>
<p>or</p>
<blockquote>
<p>do any of the packages used in this script have active vulnerabilities? ask Positron</p>
</blockquote>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/vulnerabilities.png" data-fig-align="center" data-fig-alt="Posit Assistant answering a query about vulnerabilities in the current script" />
<h2 id="interpreters">Interpreters
</h2>
<p>Positron maintains an inventory of every R and Python installation on your system so that it can recommend the best one for a new project, show a list when you ask to open a console, and so on. R and Python environment management and discovery is a complex topic with dozens of different packaging systems and conventions in play, so this inventory is invaluable.</p>
<p>Now Posit Assistant can see that list, too, answer questions about it, and set up new environments for you in Positron.</p>
<blockquote>
<p>why don&rsquo;t I see my R 4.1 installation in Positron?</p>
</blockquote>
<blockquote>
<p>what&rsquo;s the highest version of Python available in Positron?</p>
</blockquote>
<blockquote>
<p>set up a new uv environment in this Positron project</p>
</blockquote>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/new-uv-environment.png" data-fig-align="center" data-fig-alt="Posit Assistant setting up a uv environment in a new project" />
<h2 id="consoles">Consoles
</h2>
<p>Posit Assistant can now start and select consoles. This is pretty useful if you work with long-running or concurrently running code!</p>
<blockquote>
<p>run this R script in a separate Positron console</p>
</blockquote>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/separate-console.png" data-fig-align="center" data-fig-alt="Posit Assistant setting up a second R console to run a script" />
<h2 id="publishing-to-posit-connect">Publishing to Posit Connect
</h2>
<p>If you use <a href="https://posit.co/products/enterprise/connect" target="_blank" rel="noopener">Posit Connect</a>, you can ask Posit Assistant to publish your content to Connect, or <a href="https://connect.posit.cloud/" target="_blank" rel="noopener">Connect Cloud</a>.</p>
<blockquote>
<p>publish this app to Connect</p>
</blockquote>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/publish-to-connect.png" data-fig-align="center" data-fig-alt="Posit Assistant publishing a Shiny app to Posit Connect" />
<h2 id="security">Security
</h2>
<p>You&rsquo;ll be prompted each time Assistant wants to interact with Positron. Just as with code execution or shell execution, you can approve Positron commands one by one or auto-approve for your project.</p>
<p>Because Positron commands can make changes and perform some sensitive actions, they are not available in Assistant&rsquo;s <em>Ask</em> mode.</p>
<h2 id="troubleshooting--feedback">Troubleshooting &amp; Feedback
</h2>
<p>We&rsquo;re still improving the way this system works. Many of the queries above are also answerable in some form <em>without</em> consulting Positron, though the results won&rsquo;t be as good or consistent with your environment. Consequently, you may occasionally see Posit Assistant reach for the wrong tool; tell it to &ldquo;ask Positron&rdquo; or &ldquo;use a Positron command&rdquo; to accomplish a task if it gets it wrong.</p>
<p>We&rsquo;d love your feedback on this new functionality in Positron, good or bad! Drop us a line in the <a href="https://github.com/posit-dev/positron/discussions" target="_blank" rel="noopener">Positron Discussions</a> forum on Github.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/assistant-drives-positron.png" length="318736" type="image/png" />
    </item>
    <item>
      <title>Great Tables `v1.0.0` and `v1.1.0`: new formatters, conditional styling, multi-column stubs, and richer color scales</title>
      <link>https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/</link>
      <pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/</guid>
      <dc:creator>Rich Iannone</dc:creator><description><![CDATA[<p><a href="https://posit-dev.github.io/great-tables/" target="_blank" rel="noopener">Great Tables</a> reached
<code>v1.0.0</code> at the end of September, and <code>v1.1.0</code> followed only three weeks
later. Crossing into <code>1.x</code> territory means that the library&rsquo;s core API
is settled and that the work ahead consists of extending it rather than
reshaping it. The two releases, taken as a whole, move the library
forward along three lines:</p>
<ol>
<li>tables can now present specialized kinds of content (fractions,
chemical formulas, links) according to their proper conventions</li>
<li>they can respond to the values they contain, through value-based
styling and a considerably more capable <code>data_color()</code></li>
<li>they hold up better structurally, with multi-level stubs, decimal
alignment, and semantic HTML that assistive technologies can
navigate</li>
</ol>
<p>This post takes each of these additions in turn and pairs each with a
functional example. Every example draws on one of the datasets bundled
with the package, which are now reachable through a single new function,
<code>load_dataset()</code>. Passing it a dataset name and <code>tbl_type=&quot;polars&quot;</code> (or
<code>&quot;pandas&quot;</code>, the default) returns the corresponding DataFrame, so the
examples below can be run as written after upgrading to <code>v1.1.0</code>.</p>
<h2 id="new-formatters-for-specialized-values">New formatters for specialized values
</h2>
<p>Some values have conventions of their own that a general-purpose number
formatter cannot honor. A quantity like 1.75 hours reads more naturally
as &ldquo;1 3/4&rdquo; in some contexts, a list of items is often labeled A, B, C
rather than 1, 2, 3, and a chemical formula looks odd without its
specialized typesetting (e.g., subscripts, brackets, etc.). Version
<code>1.0.0</code> adds formatters for each of these cases: <code>fmt_fraction()</code>,
<code>fmt_index()</code>, and <code>fmt_chem()</code>.</p>
<p>The <code>films</code> dataset records every film in competition at the Cannes Film
Festival since 1946, with running times stored as strings like
<code>&quot;1h 44m&quot;</code>. If we convert those to decimal hours, <code>fmt_fraction()</code> can
present them as mixed fractions. Its <code>accuracy=</code> argument governs how
fine the fractions may be: the default <code>&quot;low&quot;</code> permits single-digit
denominators, <code>&quot;med&quot;</code> and <code>&quot;high&quot;</code> allow two and three digits, and an
integer fixes the denominator by that number (so <code>accuracy=4</code> gives
quarters). The <code>layout=</code> argument chooses between ordinary inline
fractions and a diagonal form with a raised numerator and lowered
denominator, which is how fractions are usually typeset. We&rsquo;ll show both
side by side and use <code>fmt_index()</code> to turn a column of integers into
lettered row labels.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">polars</span> <span class="k">as</span> <span class="nn">pl</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">great_tables</span> <span class="kn">import</span> <span class="n">GT</span><span class="p">,</span> <span class="n">md</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">great_tables.data</span> <span class="kn">import</span> <span class="n">load_dataset</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">films</span> <span class="o">=</span> <span class="n">load_dataset</span><span class="p">(</span><span class="s2">&#34;films&#34;</span><span class="p">,</span> <span class="n">tbl_type</span><span class="o">=</span><span class="s2">&#34;polars&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">loach</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">films</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;director&#34;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&#34;Ken Loach&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">head</span><span class="p">(</span><span class="mi">8</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">with_columns</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">hours</span><span class="o">=</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;run_time&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">str</span><span class="o">.</span><span class="n">extract</span><span class="p">(</span><span class="sa">r</span><span class="s2">&#34;(\d+)h&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">pl</span><span class="o">.</span><span class="n">Float64</span><span class="p">)</span><span class="o">.</span><span class="n">fill_null</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">            <span class="o">+</span> <span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;run_time&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">str</span><span class="o">.</span><span class="n">extract</span><span class="p">(</span><span class="sa">r</span><span class="s2">&#34;(\d+)m&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">pl</span><span class="o">.</span><span class="n">Float64</span><span class="p">)</span><span class="o">.</span><span class="n">fill_null</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="o">/</span> <span class="mi">60</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">with_columns</span><span class="p">(</span><span class="n">hours_diag</span><span class="o">=</span><span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;hours&#34;</span><span class="p">),</span> <span class="n">idx</span><span class="o">=</span><span class="n">pl</span><span class="o">.</span><span class="n">int_range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">pl</span><span class="o">.</span><span class="n">len</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;idx&#34;</span><span class="p">,</span> <span class="s2">&#34;title&#34;</span><span class="p">,</span> <span class="s2">&#34;year&#34;</span><span class="p">,</span> <span class="s2">&#34;run_time&#34;</span><span class="p">,</span> <span class="s2">&#34;hours&#34;</span><span class="p">,</span> <span class="s2">&#34;hours_diag&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">loach</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Ken Loach at Cannes&#34;</span><span class="p">,</span> <span class="n">subtitle</span><span class="o">=</span><span class="s2">&#34;Running times as fractions of an hour&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_index</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;idx&#34;</span><span class="p">,</span> <span class="n">pattern</span><span class="o">=</span><span class="s2">&#34;</span><span class="si">{x}</span><span class="s2">.&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_fraction</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;hours&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_fraction</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;hours_diag&#34;</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="s2">&#34;diagonal&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">idx</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">,</span> <span class="n">title</span><span class="o">=</span><span class="s2">&#34;Film&#34;</span><span class="p">,</span> <span class="n">year</span><span class="o">=</span><span class="s2">&#34;Year&#34;</span><span class="p">,</span> <span class="n">run_time</span><span class="o">=</span><span class="s2">&#34;Listed&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">hours</span><span class="o">=</span><span class="s2">&#34;Inline&#34;</span><span class="p">,</span> <span class="n">hours_diag</span><span class="o">=</span><span class="s2">&#34;Diagonal&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_spanner</span><span class="p">(</span><span class="n">label</span><span class="o">=</span><span class="s2">&#34;Hours&#34;</span><span class="p">,</span> <span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;hours&#34;</span><span class="p">,</span> <span class="s2">&#34;hours_diag&#34;</span><span class="p">])</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/fmt-fraction.png" alt="Eight Ken Loach films with lettered row labels A through H and running times shown as mixed fractions of an hour, in both inline and diagonal layouts"></p>
<p>The <code>fmt_index()</code> method maps 1 to &ldquo;A&rdquo;, 2 to &ldquo;B&rdquo;, and so on, and its
<code>pattern=</code> argument lets us append a period to each label. For values
beyond 26, the <code>index_algo=</code> argument decides what happens next:
<code>&quot;repeat&quot;</code> doubles the letter (&ldquo;AA&rdquo;, &ldquo;BB&rdquo;), while <code>&quot;excel&quot;</code> follows the
spreadsheet convention of column names (&ldquo;AA&rdquo;, &ldquo;AB&rdquo;). There is also a
<code>case=</code> argument for lowercase labels.</p>
<p>The <code>fmt_chem()</code> method handles our own brand of chemistry notation and
renders it with the correct typography. So you get to incorporate things
like: subscripted atom counts, superscripted charges, isotope notation,
stoichiometric coefficients, various reaction arrows, etc. The
<code>reactions</code> dataset, which contains rate constants for the gas-phase
reactions of organic compounds with atmospheric oxidants, stores its
formulas as plain strings and makes for a good test of this method.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">reactions</span> <span class="o">=</span> <span class="n">load_dataset</span><span class="p">(</span><span class="s2">&#34;reactions&#34;</span><span class="p">,</span> <span class="n">tbl_type</span><span class="o">=</span><span class="s2">&#34;polars&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">compounds</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">reactions</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;cmpd_name&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">is_in</span><span class="p">([</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;methane&#34;</span><span class="p">,</span> <span class="s2">&#34;ethanol&#34;</span><span class="p">,</span> <span class="s2">&#34;acetone&#34;</span><span class="p">,</span> <span class="s2">&#34;benzene&#34;</span><span class="p">,</span> <span class="s2">&#34;toluene&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;dimethyl sulfide&#34;</span><span class="p">,</span> <span class="s2">&#34;isoprene&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="p">])</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;cmpd_name&#34;</span><span class="p">,</span> <span class="s2">&#34;cmpd_formula&#34;</span><span class="p">,</span> <span class="s2">&#34;cmpd_mwt&#34;</span><span class="p">,</span> <span class="s2">&#34;OH_k298&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="s2">&#34;cmpd_mwt&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">compounds</span><span class="p">,</span> <span class="n">rowname_col</span><span class="o">=</span><span class="s2">&#34;cmpd_name&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Reaction Rates with the Hydroxyl Radical&#34;</span><span class="p">,</span> <span class="n">subtitle</span><span class="o">=</span><span class="n">md</span><span class="p">(</span><span class="s2">&#34;Rate constants at 298 K&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_chem</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;cmpd_formula&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_number</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;cmpd_mwt&#34;</span><span class="p">,</span> <span class="n">decimals</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_scientific</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;OH_k298&#34;</span><span class="p">,</span> <span class="n">decimals</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">cmpd_formula</span><span class="o">=</span><span class="s2">&#34;Formula&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">cmpd_mwt</span><span class="o">=</span><span class="s2">&#34;Mol. Weight&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">OH_k298</span><span class="o">=</span><span class="n">md</span><span class="p">(</span><span class="s2">&#34;k&lt;sub&gt;OH&lt;/sub&gt;&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/fmt-chem.png" alt="Seven organic compounds with their chemical formulas properly subscripted, molecular weights, and hydroxyl radical rate constants in scientific notation"></p>
<p>The formulas here are simple ones, but the same method will typeset an
entire reaction such as <code>&quot;2 CH3OH -&gt; CH3OCH3 + H2O&quot;</code> placed in a cell,
and it does so in LaTeX output as well as HTML as of <code>v1.1.0</code>.</p>
<h2 id="links-and-buttons-with-fmt_url-and-fmt_email">Links and buttons with <code>fmt_url()</code> and <code>fmt_email()</code>
</h2>
<p>Tables are frequently a point of departure. You might need a table with
a list of resources, a directory of people, or an index of documents.
The <code>fmt_url()</code> and <code>fmt_email()</code> methods turn columns of URLs and email
addresses into working links, so the reader can follow them directly
from the table. Both methods accept a fixed label (or a function that
computes one from each value), and both can render their links either as
underlined text or as small buttons with configurable fill, outline, and
width.</p>
<p>The <code>films</code> dataset includes an IMDb link for each film, which is a good
candidate for a button. Here we give every link the same short label and
a fill color that matches IMDb&rsquo;s own.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">wenders</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">films</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;director&#34;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&#34;Wim Wenders&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;year&#34;</span><span class="p">,</span> <span class="s2">&#34;title&#34;</span><span class="p">,</span> <span class="s2">&#34;run_time&#34;</span><span class="p">,</span> <span class="s2">&#34;imdb_url&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">head</span><span class="p">(</span><span class="mi">6</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">wenders</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Wim Wenders at Cannes&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_url</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;imdb_url&#34;</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s2">&#34;IMDb&#34;</span><span class="p">,</span> <span class="n">as_button</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">button_fill</span><span class="o">=</span><span class="s2">&#34;#F5C518&#34;</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s2">&#34;black&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="s2">&#34;Year&#34;</span><span class="p">,</span> <span class="n">title</span><span class="o">=</span><span class="s2">&#34;Film&#34;</span><span class="p">,</span> <span class="n">run_time</span><span class="o">=</span><span class="s2">&#34;Running Time&#34;</span><span class="p">,</span> <span class="n">imdb_url</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/fmt-url.png" alt="Six Wim Wenders films with a yellow IMDb button in the final column of each row"></p>
<p>The <code>fmt_email()</code> method works in the same way, producing <code>mailto:</code>
links. In its most basic form it simply makes each address clickable, as
in this small directory drawn from the <code>peeps</code> dataset (full of
fictional people).</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">peeps</span> <span class="o">=</span> <span class="n">load_dataset</span><span class="p">(</span><span class="s2">&#34;peeps&#34;</span><span class="p">,</span> <span class="n">tbl_type</span><span class="o">=</span><span class="s2">&#34;polars&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">contacts</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">peeps</span><span class="o">.</span><span class="n">head</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">with_columns</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;name_given&#34;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&#34; &#34;</span> <span class="o">+</span> <span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;name_family&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;name&#34;</span><span class="p">,</span> <span class="s2">&#34;city&#34;</span><span class="p">,</span> <span class="s2">&#34;state_prov&#34;</span><span class="p">,</span> <span class="s2">&#34;email_addr&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">contacts</span><span class="p">,</span> <span class="n">rowname_col</span><span class="o">=</span><span class="s2">&#34;name&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_email</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;email_addr&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span><span class="n">city</span><span class="o">=</span><span class="s2">&#34;City&#34;</span><span class="p">,</span> <span class="n">state_prov</span><span class="o">=</span><span class="s2">&#34;State&#34;</span><span class="p">,</span> <span class="n">email_addr</span><span class="o">=</span><span class="s2">&#34;Email&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/fmt-email.png" alt="Five people with their city, state, and an underlined, clickable email address"></p>
<p>The images in this post are static, of course, but in HTML output these
links are live. Links open in a new tab by default, which can be changed
through the <code>target=</code> argument, and in LaTeX output they are now written
with <code>\href</code> so that they remain clickable in a typeset PDF.</p>
<h2 id="styling-cells-by-their-values-with-tab_style_body">Styling cells by their values with <code>tab_style_body()</code>
</h2>
<p>The <code>tab_style()</code> method has always asked a question about <em>where</em>: you
name a location (a column, a set of rows, the column labels) and the
style is applied there. Often, though, the question we want to ask is
about <em>what</em>. We want every cell containing a particular value to stand
out, or every row in which some condition holds, regardless of where
those cells happen to sit. The new <code>tab_style_body()</code> method is built
for this. It matches body cells by exact values (<code>values=</code>), by a
regular expression applied to the cell&rsquo;s text (<code>pattern=</code>), or by an
arbitrary predicate function (<code>fn=</code>), and the <code>targets=</code> argument
decides whether the style should be applied to the matched cell alone,
its whole row, or its whole column.</p>
<p>The <code>metro</code> dataset describes the stations of the Paris Métro, including
the lines that serve each one, the RER commuter-rail connections, and
annual passenger counts. In the table below we highlight every station
connected to RER line A, extending the fill across the entire row (and
into the stub), and separately set in bold purple the line listings that
include line 14 (the fully automated line).</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">great_tables</span> <span class="kn">import</span> <span class="n">style</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">metro</span> <span class="o">=</span> <span class="n">load_dataset</span><span class="p">(</span><span class="s2">&#34;metro&#34;</span><span class="p">,</span> <span class="n">tbl_type</span><span class="o">=</span><span class="s2">&#34;polars&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">metro_busy</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">metro</span><span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;name&#34;</span><span class="p">,</span> <span class="s2">&#34;lines&#34;</span><span class="p">,</span> <span class="s2">&#34;connect_rer&#34;</span><span class="p">,</span> <span class="s2">&#34;passengers&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">drop_nulls</span><span class="p">(</span><span class="s2">&#34;passengers&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">top_k</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="n">by</span><span class="o">=</span><span class="s2">&#34;passengers&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="s2">&#34;passengers&#34;</span><span class="p">,</span> <span class="n">descending</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">metro_busy</span><span class="p">,</span> <span class="n">rowname_col</span><span class="o">=</span><span class="s2">&#34;name&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;The Busiest Stations of the Paris Métro&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_integer</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;passengers&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">sub_missing</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;connect_rer&#34;</span><span class="p">,</span> <span class="n">missing_text</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span><span class="n">lines</span><span class="o">=</span><span class="s2">&#34;Lines&#34;</span><span class="p">,</span> <span class="n">connect_rer</span><span class="o">=</span><span class="s2">&#34;RER&#34;</span><span class="p">,</span> <span class="n">passengers</span><span class="o">=</span><span class="s2">&#34;Passengers&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_style_body</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="o">.</span><span class="n">fill</span><span class="p">(</span><span class="n">color</span><span class="o">=</span><span class="s2">&#34;#FFF3C4&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="n">pattern</span><span class="o">=</span><span class="sa">r</span><span class="s2">&#34;\bA\b&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">targets</span><span class="o">=</span><span class="s2">&#34;row&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">extents</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;body&#34;</span><span class="p">,</span> <span class="s2">&#34;stub&#34;</span><span class="p">],</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_style_body</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="n">weight</span><span class="o">=</span><span class="s2">&#34;bold&#34;</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s2">&#34;#6E3FA3&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="n">columns</span><span class="o">=</span><span class="s2">&#34;lines&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">pattern</span><span class="o">=</span><span class="sa">r</span><span class="s2">&#34;\b14\b&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/tab-style-body.png" alt="The twelve busiest Paris Métro stations, with rows for stations on RER A filled in pale yellow and the line listings that include line 14 set in bold purple"></p>
<p>The word boundaries in each pattern are pretty important here. Without
them, <code>&quot;14&quot;</code> would also match a hypothetical line 140, and <code>&quot;A&quot;</code> would
match any text containing that letter. Matching is performed against the
underlying data rather than the formatted output, so a predicate passed
to <code>fn=</code> receives the raw value (a number, a date, a string) and can
compare it directly.</p>
<h2 id="multi-column-stubs">Multi-column stubs
</h2>
<p>The stub is the column of row labels on the left side of a table, and
until now it could hold only a single column. Many datasets, however,
have a natural hierarchy among their identifying columns: region and
city (<code>towny</code>), manufacturer and model (<code>gtcars</code>), etc. In <code>v1.1.0</code>, the
<code>rowname_col=</code> argument accepts a list of column names, and the stub is
built from all of them, with repeated values in the outer levels merged
into a single spanning cell.</p>
<p>Once a stub has several levels, we need a way to refer to each one. The
new <code>stub</code> selector serves this purpose in any <code>columns=</code> argument:
<code>stub</code> alone refers to the whole stub, and <code>stub(n)</code> refers to a single
level, counted from the right. In the example below, built from the
<code>gtcars</code> dataset of high-performance cars, <code>stub(1)</code> is the model and
<code>stub(2)</code> is the manufacturer, and we give each its own width. We also
bold the manufacturer level alone by passing <code>columns=</code> to <code>loc.stub()</code>.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">great_tables</span> <span class="kn">import</span> <span class="n">loc</span><span class="p">,</span> <span class="n">stub</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">gtcars</span> <span class="o">=</span> <span class="n">load_dataset</span><span class="p">(</span><span class="s2">&#34;gtcars&#34;</span><span class="p">,</span> <span class="n">tbl_type</span><span class="o">=</span><span class="s2">&#34;polars&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">cars</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">gtcars</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;mfr&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">is_in</span><span class="p">([</span><span class="s2">&#34;Ferrari&#34;</span><span class="p">,</span> <span class="s2">&#34;Lamborghini&#34;</span><span class="p">,</span> <span class="s2">&#34;Porsche&#34;</span><span class="p">]))</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;mfr&#34;</span><span class="p">,</span> <span class="s2">&#34;model&#34;</span><span class="p">,</span> <span class="s2">&#34;year&#34;</span><span class="p">,</span> <span class="s2">&#34;hp&#34;</span><span class="p">,</span> <span class="s2">&#34;trq&#34;</span><span class="p">,</span> <span class="s2">&#34;msrp&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="s2">&#34;mfr&#34;</span><span class="p">,</span> <span class="s2">&#34;model&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">cars</span><span class="p">,</span> <span class="n">rowname_col</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;mfr&#34;</span><span class="p">,</span> <span class="s2">&#34;model&#34;</span><span class="p">])</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Three European Marques&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_integer</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;hp&#34;</span><span class="p">,</span> <span class="s2">&#34;trq&#34;</span><span class="p">])</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_currency</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;msrp&#34;</span><span class="p">,</span> <span class="n">decimals</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="s2">&#34;Year&#34;</span><span class="p">,</span> <span class="n">hp</span><span class="o">=</span><span class="s2">&#34;HP&#34;</span><span class="p">,</span> <span class="n">trq</span><span class="o">=</span><span class="s2">&#34;Torque&#34;</span><span class="p">,</span> <span class="n">msrp</span><span class="o">=</span><span class="s2">&#34;MSRP&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_width</span><span class="p">(</span><span class="n">cases</span><span class="o">=</span><span class="p">{</span><span class="n">stub</span><span class="p">(</span><span class="mi">2</span><span class="p">):</span> <span class="s2">&#34;120px&#34;</span><span class="p">,</span> <span class="n">stub</span><span class="p">(</span><span class="mi">1</span><span class="p">):</span> <span class="s2">&#34;140px&#34;</span><span class="p">})</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_style</span><span class="p">(</span><span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="n">weight</span><span class="o">=</span><span class="s2">&#34;bold&#34;</span><span class="p">),</span> <span class="n">locations</span><span class="o">=</span><span class="n">loc</span><span class="o">.</span><span class="n">stub</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;mfr&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_stubhead</span><span class="p">(</span><span class="n">label</span><span class="o">=</span><span class="s2">&#34;Car&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/multi-column-stub.png" alt="Sixteen cars from Ferrari, Lamborghini, and Porsche, with a two-level stub in which each manufacturer name spans the rows of its models"></p>
<p>A related change accompanies this feature. Stub and row group columns
are now excluded from column selections, as was always the intent, so
that a method called without <code>columns=</code> targets only the body. One
visible consequence is that <code>data_color()</code> no longer colors the cells of
the stub when it is applied to the whole table.</p>
<h2 id="lining-up-numbers-with-cols_align_decimal">Lining up numbers with <code>cols_align_decimal()</code>
</h2>
<p>Right-aligning a column of numbers works well when every value has the
same number of decimal places. When they differ, the digits of equal
magnitude no longer sit above one another, and the eye must work harder
to compare values. The new <code>cols_align_decimal()</code> method solves this by
padding each formatted value with figure spaces (spaces exactly as wide
as a digit) so that the decimal marks fall in a single vertical line.
Because it operates after formatting, it works with the output of any
<code>fmt_*()</code> method, including values with suffixes like <code>%</code>.</p>
<p>The <code>constants</code> dataset of fundamental physical constants is about as
varied in magnitude as data gets. In the table below, the same values
appear twice: once with ordinary right alignment and once aligned on the
decimal mark.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">constants</span> <span class="o">=</span> <span class="n">load_dataset</span><span class="p">(</span><span class="s2">&#34;constants&#34;</span><span class="p">,</span> <span class="n">tbl_type</span><span class="o">=</span><span class="s2">&#34;polars&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">const_mini</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">constants</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;name&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">is_in</span><span class="p">([</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;speed of light in vacuum&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;standard acceleration of gravity&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;molar gas constant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;Faraday constant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;fine-structure constant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;inverse fine-structure constant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;proton-electron mass ratio&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;Wien wavelength displacement law constant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="p">])</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;name&#34;</span><span class="p">,</span> <span class="s2">&#34;value&#34;</span><span class="p">,</span> <span class="s2">&#34;units&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">with_columns</span><span class="p">(</span><span class="n">aligned</span><span class="o">=</span><span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;value&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;name&#34;</span><span class="p">,</span> <span class="s2">&#34;value&#34;</span><span class="p">,</span> <span class="s2">&#34;aligned&#34;</span><span class="p">,</span> <span class="s2">&#34;units&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">const_mini</span><span class="p">,</span> <span class="n">rowname_col</span><span class="o">=</span><span class="s2">&#34;name&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;A Few Physical Constants&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_number</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;value&#34;</span><span class="p">,</span> <span class="s2">&#34;aligned&#34;</span><span class="p">],</span> <span class="n">decimals</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span> <span class="n">drop_trailing_zeros</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_align_decimal</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;aligned&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">sub_missing</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;units&#34;</span><span class="p">,</span> <span class="n">missing_text</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_units</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="s2">&#34;units&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="s2">&#34;Default&#34;</span><span class="p">,</span> <span class="n">aligned</span><span class="o">=</span><span class="s2">&#34;Aligned&#34;</span><span class="p">,</span> <span class="n">units</span><span class="o">=</span><span class="s2">&#34;Units&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/cols-align-decimal.png" alt="Eight physical constants shown twice, first right-aligned and then aligned on the decimal point, with units typeset in a final column"></p>
<p>In the aligned column, the integer parts and the fractional parts each
occupy their own region, and the relative magnitudes of the constants
become apparent at a glance. Locales that use a comma as the decimal
mark are handled through the <code>dec_mark=</code> or <code>locale=</code> arguments (or by
the locale set on the table itself).</p>
<h2 id="a-more-capable-data_color">A more capable <code>data_color()</code>
</h2>
<p>The <code>data_color()</code> method colors cells according to their values, and
<code>v1.1.0</code> gives it more new capabilities than any other part of the
library. Three new arguments change what kinds of color scales are
possible, and two changes to its defaults improve every table that uses
it.</p>
<p>The first of the new arguments is <code>midpoint=</code>. Many quantities have a
meaningful center (a change of zero, a ratio of one, a score of fifty)
and should be colored with a diverging palette that fades to neutral at
that center and intensifies in opposite directions on either side.
Setting <code>midpoint=0</code> centers the palette there and, unless you supply a
<code>domain=</code> yourself, makes the domain symmetric around it. The <code>towny</code>
dataset records population change across five census periods, and with a
red-to-blue palette, growth and decline become visually opposed.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">polars.selectors</span> <span class="k">as</span> <span class="nn">cs</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">towny</span> <span class="o">=</span> <span class="n">load_dataset</span><span class="p">(</span><span class="s2">&#34;towny&#34;</span><span class="p">,</span> <span class="n">tbl_type</span><span class="o">=</span><span class="s2">&#34;polars&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">towny_change</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">towny</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="p">(</span><span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;csd_type&#34;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&#34;city&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="o">&amp;</span> <span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;name&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">is_in</span><span class="p">([</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;Toronto&#34;</span><span class="p">,</span> <span class="s2">&#34;Ottawa&#34;</span><span class="p">,</span> <span class="s2">&#34;Mississauga&#34;</span><span class="p">,</span> <span class="s2">&#34;Hamilton&#34;</span><span class="p">,</span> <span class="s2">&#34;London&#34;</span><span class="p">,</span> <span class="s2">&#34;Kitchener&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;Windsor&#34;</span><span class="p">,</span> <span class="s2">&#34;Greater Sudbury&#34;</span><span class="p">,</span> <span class="s2">&#34;St. Catharines&#34;</span><span class="p">,</span> <span class="s2">&#34;Kingston&#34;</span><span class="p">,</span> <span class="s2">&#34;Waterloo&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;Thunder Bay&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="p">])</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;name&#34;</span><span class="p">,</span> <span class="n">cs</span><span class="o">.</span><span class="n">starts_with</span><span class="p">(</span><span class="s2">&#34;pop_change&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="s2">&#34;name&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">towny_change</span><span class="p">,</span> <span class="n">rowname_col</span><span class="o">=</span><span class="s2">&#34;name&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Population Change in Twelve Ontario Cities&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_percent</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="n">cs</span><span class="o">.</span><span class="n">starts_with</span><span class="p">(</span><span class="s2">&#34;pop_change&#34;</span><span class="p">),</span> <span class="n">decimals</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">pop_change_1996_2001_pct</span><span class="o">=</span><span class="s2">&#34;1996–01&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">pop_change_2001_2006_pct</span><span class="o">=</span><span class="s2">&#34;2001–06&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">pop_change_2006_2011_pct</span><span class="o">=</span><span class="s2">&#34;2006–11&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">pop_change_2011_2016_pct</span><span class="o">=</span><span class="s2">&#34;2011–16&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="n">pop_change_2016_2021_pct</span><span class="o">=</span><span class="s2">&#34;2016–21&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">data_color</span><span class="p">(</span><span class="n">palette</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;#B2182B&#34;</span><span class="p">,</span> <span class="s2">&#34;#F7F7F7&#34;</span><span class="p">,</span> <span class="s2">&#34;#2166AC&#34;</span><span class="p">],</span> <span class="n">midpoint</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/data-color-midpoint.png" alt="Population change for twelve Ontario cities over five census periods, with declines in shades of red, growth in shades of blue, and near-zero values close to white"></p>
<p>Because the domain is symmetric, a decline of 4% receives exactly as
much red as a gain of 4% receives blue. The handful of red cells stand
out clearly against the general pattern of growth.</p>
<p>The second new argument is <code>direction=</code>. By default, <code>data_color()</code>
computes its scale down each column, which is the right choice when the
columns hold different measurements. Sometimes, however, it is the rows
that are internally comparable and the columns that are not. In the
following table of national populations by decade, from the
<code>countrypops</code> dataset, coloring by column would merely tell us that
Brazil is larger than Ireland. With <code>direction=&quot;row&quot;</code>, each country
receives its own scale, and the colors instead trace the shape of each
country&rsquo;s history.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">countrypops</span> <span class="o">=</span> <span class="n">load_dataset</span><span class="p">(</span><span class="s2">&#34;countrypops&#34;</span><span class="p">,</span> <span class="n">tbl_type</span><span class="o">=</span><span class="s2">&#34;polars&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">pops_wide</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">countrypops</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;country_name&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">is_in</span><span class="p">([</span><span class="s2">&#34;Nigeria&#34;</span><span class="p">,</span> <span class="s2">&#34;Brazil&#34;</span><span class="p">,</span> <span class="s2">&#34;Ireland&#34;</span><span class="p">,</span> <span class="s2">&#34;Germany&#34;</span><span class="p">,</span> <span class="s2">&#34;Japan&#34;</span><span class="p">,</span> <span class="s2">&#34;Bulgaria&#34;</span><span class="p">])</span>
</span></span><span class="line"><span class="cl">        <span class="o">&amp;</span> <span class="n">pl</span><span class="o">.</span><span class="n">col</span><span class="p">(</span><span class="s2">&#34;year&#34;</span><span class="p">)</span><span class="o">.</span><span class="n">is_in</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">1960</span><span class="p">,</span> <span class="mi">2021</span><span class="p">,</span> <span class="mi">10</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">pivot</span><span class="p">(</span><span class="n">on</span><span class="o">=</span><span class="s2">&#34;year&#34;</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="s2">&#34;country_name&#34;</span><span class="p">,</span> <span class="n">values</span><span class="o">=</span><span class="s2">&#34;population&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">year_cols</span> <span class="o">=</span> <span class="p">[</span><span class="n">c</span> <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">pops_wide</span><span class="o">.</span><span class="n">columns</span> <span class="k">if</span> <span class="n">c</span> <span class="o">!=</span> <span class="s2">&#34;country_name&#34;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">pops_wide</span><span class="p">,</span> <span class="n">rowname_col</span><span class="o">=</span><span class="s2">&#34;country_name&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Population by Decade&#34;</span><span class="p">,</span> <span class="n">subtitle</span><span class="o">=</span><span class="s2">&#34;Each row is colored on its own scale&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_integer</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="n">year_cols</span><span class="p">,</span> <span class="n">compact</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">data_color</span><span class="p">(</span><span class="n">palette</span><span class="o">=</span><span class="s2">&#34;viridis&#34;</span><span class="p">,</span> <span class="n">direction</span><span class="o">=</span><span class="s2">&#34;row&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/data-color-row.png" alt="Populations of six countries by decade from 1960 to 2020, each row colored on its own viridis scale"></p>
<p>The patterns are immediately legible. Nigeria and Brazil brighten
steadily from left to right. Japan reaches its peak around 2010 and
begins to recede. And Bulgaria, whose population peaked in the 1980s,
darkens again toward the present.</p>
<p>The third new argument, <code>fn=</code>, hands the color mapping over to you. It
takes a function that receives a list of values (a column, or a row with
<code>direction=&quot;row&quot;</code>) and returns a list of colors of the same length. Any
function with that shape will do, but the library also provides three
helpers that build such functions for common cases: <code>col_numeric()</code> for
continuous scales, <code>col_factor()</code> for categories, and <code>col_bin()</code> for
numeric values cut into bins. Here <code>col_bin()</code> sorts horsepower and
torque figures from <code>gtcars</code> into four explicitly bounded bands.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">great_tables</span> <span class="kn">import</span> <span class="n">col_bin</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">hp_cars</span> <span class="o">=</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">gtcars</span><span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&#34;mfr&#34;</span><span class="p">,</span> <span class="s2">&#34;model&#34;</span><span class="p">,</span> <span class="s2">&#34;hp&#34;</span><span class="p">,</span> <span class="s2">&#34;trq&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="s2">&#34;hp&#34;</span><span class="p">,</span> <span class="n">descending</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">gather_every</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">head</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">GT</span><span class="p">(</span><span class="n">hp_cars</span><span class="p">,</span> <span class="n">rowname_col</span><span class="o">=</span><span class="s2">&#34;model&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">tab_header</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Horsepower and Torque, Binned&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">fmt_integer</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;hp&#34;</span><span class="p">,</span> <span class="s2">&#34;trq&#34;</span><span class="p">])</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">cols_label</span><span class="p">(</span><span class="n">mfr</span><span class="o">=</span><span class="s2">&#34;Make&#34;</span><span class="p">,</span> <span class="n">hp</span><span class="o">=</span><span class="s2">&#34;HP&#34;</span><span class="p">,</span> <span class="n">trq</span><span class="o">=</span><span class="s2">&#34;Torque&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">.</span><span class="n">data_color</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;hp&#34;</span><span class="p">,</span> <span class="s2">&#34;trq&#34;</span><span class="p">],</span>
</span></span><span class="line"><span class="cl">        <span class="n">fn</span><span class="o">=</span><span class="n">col_bin</span><span class="p">(</span><span class="n">palette</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;#EDF8E9&#34;</span><span class="p">,</span> <span class="s2">&#34;#BAE4B3&#34;</span><span class="p">,</span> <span class="s2">&#34;#74C476&#34;</span><span class="p">,</span> <span class="s2">&#34;#238B45&#34;</span><span class="p">],</span> <span class="n">bins</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">400</span><span class="p">,</span> <span class="mi">500</span><span class="p">,</span> <span class="mi">600</span><span class="p">,</span> <span class="mi">1000</span><span class="p">]),</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p style="text-align: center;"><img src="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/data-color-fn.png" alt="Ten cars with horsepower and torque values colored in four shades of green according to fixed bins"></p>
<p>Because the bin boundaries are fixed rather than derived from each
column&rsquo;s range, the two columns share a common scale: the Rolls-Royce
Dawn&rsquo;s 563 horsepower and 575 lb-ft of torque fall in the same band and
receive the same green. This is something the automatic scaling of
<code>data_color()</code> cannot express on its own.</p>
<p>Finally, two changes to the defaults affect every table that uses
<code>data_color()</code>, whether or not it uses any of the new arguments. When
the method chooses a text color to sit on top of each fill, it now
judges legibility with APCA (the Accessible Perceptual Contrast
Algorithm) rather than the older WCAG contrast ratio. APCA models human
perception of contrast more faithfully, particularly for mid-tone
backgrounds, and you can see its choices in the tables above where light
text appears only on fills that are genuinely dark. If you need the
previous behavior, <code>contrast_algo=&quot;wcag&quot;</code> restores it. Palettes are also
now interpolated in the CIELAB color space, which is designed so that
equal numerical steps correspond to roughly equal perceived differences,
and the resulting gradients are smoother and more even than those
interpolated in RGB.</p>
<h2 id="accessible-html-tables">Accessible HTML tables
</h2>
<p>A table that looks clear on screen can still be difficult to navigate
for someone using a screen reader, because the visual relationship
between a cell and its headers is not by itself available to assistive
software. As of <code>v1.1.0</code>, the HTML that Great Tables produces carries
this information explicitly. Every column header and stub cell receives
an <code>id</code>, and every body cell lists the headers it belongs to in a
<code>headers</code> attribute. Stub cells are marked up as row headers with
<code>scope=&quot;row&quot;</code>, column headers carry <code>scope=&quot;col&quot;</code>, and the table as a
whole is labeled and described by its title and subtitle through
<code>aria-labelledby</code> and <code>aria-describedby</code>.</p>
<p>A new
<a href="https://posit-dev.github.io/great-tables/user-guide/accessibility.html" target="_blank" rel="noopener">Accessibility</a>
page in the User Guide describes all of this in more detail and it also
offers guidance on creating tables that work well for everyone.</p>
<h2 id="smaller-changes-worth-knowing-about">Smaller changes worth knowing about
</h2>
<p>Several smaller changes in these releases deserve a mention. The number
formatters gained a <code>min_sep_threshold=</code> argument that sets how many
digits a number must have before digit grouping applies. The <code>v1.1.0</code>
release also fixed more than sixty bugs, most of them in the number
formatters.</p>
<p>LaTeX output received a great deal of attention as well. Units notation
and <code>fmt_chem()</code> now render in LaTeX. Summary rows, decimal alignment,
and stub indentation are rendered correctly. A long list of escaping
problems with special characters has also been resolved.</p>
<h2 id="getting-started">Getting started
</h2>
<p>Great Tables <code>v1.1.0</code> is available now on PyPI, so
<code>pip install --upgrade great-tables</code> brings everything described here.
The <a href="https://posit-dev.github.io/great-tables/" target="_blank" rel="noopener">documentation site</a>
covers each new method with runnable examples, and the full changelogs
for
<a href="https://github.com/posit-dev/great-tables/releases/tag/v1.0.0" target="_blank" rel="noopener"><code>v1.0.0</code></a>
and
<a href="https://github.com/posit-dev/great-tables/releases/tag/v1.1.0" target="_blank" rel="noopener"><code>v1.1.0</code></a>
list every fix and change in detail.</p>
<p>Looking back across both releases, the common thread is a table that
knows more about what it contains. It knows that a fraction, a formula,
or a link has a proper form. It also knows which cells deserve emphasis
because of what they hold rather than where they sit. Many people
contributed to this work, and we are especially grateful to
<a href="https://github.com/LuisFigueroaG" target="_blank" rel="noopener">@LuisFigueroaG</a>,
<a href="https://github.com/raashish1601" target="_blank" rel="noopener">@raashish1601</a>,
<a href="https://github.com/manan28025" target="_blank" rel="noopener">@manan28025</a>,
<a href="https://github.com/Rodrigo-Palma" target="_blank" rel="noopener">@Rodrigo-Palma</a>,
<a href="https://github.com/taekop" target="_blank" rel="noopener">@taekop</a>,
<a href="https://github.com/blaahhrrgg" target="_blank" rel="noopener">@blaahhrrgg</a>, and
<a href="https://github.com/naseem173" target="_blank" rel="noopener">@naseem173</a>. If you have a feature to
request or a bug to report, the <a href="https://github.com/posit-dev/great-tables" target="_blank" rel="noopener">GitHub
repository</a> is the right
place to get in touch!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/assets/great-tables-v-1-1-0-release.png" length="1556573" type="image/png" />
    </item>
    <item>
      <title>Positron October Release Highlights</title>
      <link>https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/</link>
      <pubDate>Tue, 13 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/</guid>
      <dc:creator>Julia Silge</dc:creator><description><![CDATA[<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p><a href="https://positron.posit.co/?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=intro-note" target="_blank" rel="noopener">Positron</a> is Posit&rsquo;s new, next-generation IDE for data science. Positron is designed to be an extensible, polyglot tool for exploring data and reproducible authoring in Python, R, and more.</p>
</div>
</div>
<p>Welcome back to another edition of our monthly Positron updates! Each month we share highlights from our <a href="https://positron.posit.co/release-notes?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=release-notes-link" target="_blank" rel="noopener">latest release</a> and useful resources. <a href="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release">Last release</a> we told you about a redesigned welcome page, a first version of Import Data, new Posit Assistant features, expanded Data Connections, package vulnerability scanning, and a more responsive Console. This milestone brings a new ability for Posit Assistant to drive Positron itself, a built-in MCP server so you can bring your own coding agent, Data Connections on by default, faster language features for Quarto, and smoother interpreter and project setup.</p>
<h2 id="posit-assistant-can-drive-positron">Posit Assistant can drive Positron
</h2>
<p><a href="https://assistant.posit.co/?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=assistant-section" target="_blank" rel="noopener">Posit Assistant</a> can now operate Positron itself, not just the R or Python session inside it. You can ask it to run a Shiny app, open a Parquet file in the Data Explorer, set up a Python environment, browse your data connections, or deploy to Posit Connect. Posit Assistant uses the same source of truth as the Positron UI, so it works with your real interpreters, packages, and connections rather than guessing at them.</p>
<img src="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/assistant-data-explorer.png" data-fig-align="center" data-fig-alt="Positron with the Posit Assistant chat beside the Data Explorer, which shows pokemon.xlsx that Posit Assistant opened." />
<p>In practice, this means Posit Assistant can run and preview Dash, FastAPI, Flask, Gradio, marimo, Streamlit, and Shiny apps with the same app commands you use, see which apps are running along with their status and URL, and stop them. It can show HTML files and URLs in the Viewer pane, and it can read, take screenshots of, and interact with data apps and other content there, which makes it much more useful for checking its own work on an app. It can read your configured and detected Data Connections, browse a connection&rsquo;s schema, and give you the code to open it. It can also tell which interpreter a project uses, explain why an installed interpreter isn&rsquo;t showing up, and make that interpreter available, and it knows the commands for deploying to Connect through Posit Publisher.</p>
<p>To try this preview feature, enable the <a href="positron://settings/assistant.previewFeatures"><code>assistant.previewFeatures</code></a> setting, and tell us what you think in the <a href="https://github.com/posit-dev/positron/discussions/16280" target="_blank" rel="noopener">GitHub discussion</a>.</p>
<h2 id="bring-your-own-coding-agent">Bring your own coding agent
</h2>
<p>If you already have a favorite coding agent other than Posit Assistant, this release lets it work alongside you in Positron. A new built-in Model Context Protocol (MCP) server lets coding agents such as Claude Code, Codex, and Gemini CLI work in your live Python and R sessions. Our goal is to give these agents a set of tools comparable to what Posit Assistant has: agents can list your sessions, run code in the Console, inspect objects without cluttering your history, read recent session history, interrupt a long-running computation, look at the current plot, and search for and run Positron commands. These other agents may not have the data science expertise that Posit Assistant has, but they can still help you write code and explore data.</p>
<p>You stay in the loop on what an agent does. Code that an agent runs shows up in the Console with the agent&rsquo;s name next to it, so you can always tell agent code from your own. Console tabs also now show a dot when code runs in a console you aren&rsquo;t looking at, whether that code came from Posit Assistant or an external agent.</p>
<img src="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/claude-code-in-positron.png" data-fig-align="center" data-fig-alt="Claude Code in Positron&#39;s editor area, asked whether to visualize country-to-country twinning relationships as a heatmap or a network graph. It calls the Positron execute_code and get_plot tools, then recommends the heatmap and explains it. In the Console, the R code it ran is labeled Claude Code, and the Plots pane shows the resulting heatmap of twinning links between the top countries." />
<p>To try this experimental feature, enable the <a href="positron://settings/ai.mcp.enabled"><code>ai.mcp.enabled</code></a> setting. Positron configures Claude Code for you automatically, and the <em>Positron MCP: Add to Coding Agent</em> command sets up the Codex and Gemini CLIs. For any other MCP client, <em>Copy Connection Details</em> gives you a URL and token to connect with.</p>
<h2 id="data-connections-on-by-default">Data Connections on by default
</h2>
<p><a href="https://positron.posit.co/data-connections?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=data-connections-section" target="_blank" rel="noopener">Data Connections</a> is now the default way to work with databases and data warehouses in Positron. Data Connections connects to databases directly, without needing a Python or R session, and it replaces both the older Connections pane and the Catalog Explorer. If you need the older Connections pane, set <a href="positron://settings/dataConnections.enabled"><code>dataConnections.enabled</code></a> to <code>false</code> and reload the window.</p>
<p>This release also extends what you can connect to and how you sign in. Amazon Redshift connections can sign in with AWS Identity and Access Management (IAM), for both Redshift Serverless and provisioned clusters, using credentials from the standard AWS credential provider chain. On Posit Workbench, Snowflake and Databricks connections can use the session&rsquo;s managed credentials with no credential input at all. Snowflake users get the most new features this month; the Data Connections pane shows Snowflake semantic views with their dimensions, facts, metrics, and relationships, you can browse Snowflake stages as folders and files, and connections in <code>connections.toml</code> show up automatically as detected connections.</p>
<p>Smaller improvements round out the experience. When you open a DuckDB or SQLite file from the Explorer, Positron offers to create a data connection for it. <strong>Connect With</strong> can now generate ggsql code for SQLite, DuckDB, ODBC, PostgreSQL, and Redshift connections.</p>
<img src="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/connections-ggsql-bikeshare.gif" data-fig-align="center" data-fig-alt="The Data Connections pane in Positron showing a Bikeshare demo SQLite connection. Choosing ggsql under Connect With opens a dialog with the generated connection code. After clicking Connect, the code runs in a ggsql console, followed by a SQL query that counts bikes by bike type and returns a results table." />
<p>The <strong>Add Data Connection</strong> dialog lists each driver with a short description, and Positron now tells you when a connection fails to open or expand. For slow tables and views, the Data Explorer now shows a progress indicator and placeholders while data arrives, and it loads column summaries in two passes so that missing-value counts appear quickly and sparklines follow later.</p>
<h2 id="faster-language-features-for-quarto">Faster language features for Quarto
</h2>
<p>Positron now provides completions, hover, diagnostics, outline, formatting, and other language features natively for R and Python cells in Quarto and R Markdown documents. Before, the Quarto extension wrote temporary virtual documents to disk to power these features. Positron now uses a virtual notebook in memory instead, which is faster (especially in remote sessions) and solves a whole category of bugs, such as Python imports that did not resolve correctly. It also means Go to Definition, Find References, and Rename work across R cells, finding names that earlier cells define.</p>
<p>The document outline for Quarto and R Markdown documents with many code chunks now updates quickly, and it no longer shows duplicate groups or symbols. Inline output, including HTML tables and the inline Data Explorer, now scales with your editor font size. If you run into problems with the new language features and need to go back to the old behavior, set <a href="positron://settings/quarto.embeddedLanguageFeatures.native"><code>quarto.embeddedLanguageFeatures.native</code></a> to <code>false</code>.</p>
<h2 id="interpreter-project-setup">Interpreter project setup
</h2>
<p>Positron is better at setting up the right Python environment for your project. When a workspace has a <code>uv.lock</code> or <code>pixi.lock</code> file but no environment yet, Positron offers to create it with <code>uv sync</code> or <code>pixi install</code>, which is especially handy right after you clone a project. If uv is missing, the New Folder flow can install it for you, and package installs and the Packages pane work with uv right away. When Positron finds a new Python environment in a workspace, it now offers to start a console session in it, and system Python installations now show last in the interpreter picker, below uv, venv, conda, and pyenv environments.</p>
<img src="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/uv-lock-create-env.gif" data-fig-align="center" data-fig-alt="A Shiny dashboard Quarto document open in Positron. A notification says the project has a uv.lock file but no virtual environment and offers to run uv sync. After clicking Yes, Positron creates the environment and then offers to start a console session with it." />
<p>For more control over interpreters in <em>both</em> Python and R, interpreter path settings now support <code>${workspaceFolder}</code>, so a project can point to an interpreter that lives inside it. The new <a href="positron://settings/interpreters.definitions"><code>interpreters.definitions</code></a> setting lets you define additional R and Python interpreters, each with its own label, environment variables, and startup script. This is useful for workflows like loading environment modules or configuring rJava before a session starts. Set <a href="positron://settings/interpreters.discovery"><code>interpreters.discovery</code></a> to <code>definitionsOnly</code> to show only the interpreters you have defined for a language.</p>
<h2 id="whats-coming-next">What&rsquo;s coming next
</h2>
<ul>
<li>Meet Posit at <a href="https://posit.co/events/snowflake-world-tour-2026-nyc?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_term=snowflake&amp;utm_content=events-section" target="_blank" rel="noopener">Snowflake World Tour NYC</a> on October 15. Stop by our booth, schedule time with a Posit expert, or catch our theater session on AI-powered data science where your data lives, inside Snowflake.</li>
<li>Join us at <a href="https://opensource.posit.co/events/data-outpost-2026/" target="_blank" rel="noopener">Data Outpost</a> on November 4-5 in San Francisco. I&rsquo;ll be speaking on &ldquo;The SQL Agent Harness We Didn&rsquo;t Mean to Build,&rdquo; about how the SQL tools we built in Positron for people turned out to already be a harness for AI assistants.</li>
</ul>
<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title">Tip</span>
</div>
<div class="callout-body">
<p><a href="https://positron.posit.co/download?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=download-cta" target="_blank" rel="noopener">Download Positron</a> to try out the new features and improvements in this release!</p>
</div>
</div>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/featured.svg" length="91754" type="image/svg&#43;xml" />
    </item>
    <item>
      <title>Correct, transparent, and reproducible data agents</title>
      <link>https://opensource.posit.co/blog/2026-10-09_ai-newsletter/</link>
      <pubDate>Fri, 09 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-09_ai-newsletter/</guid>
      <dc:creator>Sara Altman</dc:creator>
      <dc:creator>Simon Couch</dc:creator><description><![CDATA[<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title"><strong>Subscribe to the AI Newsletter!</strong></span>
</div>
<div class="callout-body">
<p>The AI newsletter is published as an RSS feed. Follow it in your favorite reader:</p>
<p><a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener noreferrer" class="btn-shortcode inline-flex mb-5 mr-5 items-center px-4 py-3 text-sm leading-5 gap-2 rounded-lg bg-blue-400 !text-white font-semibold align-middle hover:bg-blue-500 transition no-underline">Subscribe via RSS</a></p>
<p><strong>Want the newsletter as an email?</strong> Paste the feed URL, <a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener">https://opensource.posit.co/tags/ai-newsletter/index.xml</a>, into a free RSS-to-email service such as <a href="https://blogtrottr.com/" target="_blank" rel="noopener">Blogtrottr</a>, <a href="https://feedrabbit.com/" target="_blank" rel="noopener">Feedrabbit</a>, or <a href="https://follow.it/" target="_blank" rel="noopener">Follow.it</a>, and each new issue will arrive in your inbox.</p>
</div>
</div>
<style>
.blog-toc-content ul ul {
  display: none;
}
.prose img[src*="images/slides/"],
.prose video.column-page {
  border-radius: 0.25rem;
  box-shadow:
    0 1rem 2.5rem rgba(28, 45, 70, 0.14),
    0 0.2rem 0.6rem rgba(28, 45, 70, 0.1);
}
.prose img[src*="images/slides/"] {
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}
.prose img[src*="images/slides/"]:hover,
.prose img[src*="images/slides/"]:focus-visible {
  box-shadow:
    0 1.2rem 3rem rgba(28, 45, 70, 0.2),
    0 0.25rem 0.75rem rgba(28, 45, 70, 0.14);
  transform: translateY(-2px);
}
</style>
<p>Last month, we gave a posit::conf(2026) keynote on building correct, transparent, and reproducible data agents. The talk brings together many themes from this newsletter, so this week we&rsquo;re sharing an annotated walkthrough. You can also see the full slide deck <a href="https://pos.it/keynote" target="_blank" rel="noopener">here</a>.</p>
<h2 id="correctness-vsconvenience">Correctness vs. convenience
</h2>
<p><strong>(Simon)</strong></p>
<p>This morning, your VP pulled up a coding agent and asked a reasonable question:</p>
<blockquote>
<p>How is traffic trending for our site?</p>
</blockquote>
<p>The agent looked around the workspace, found a table that seemed relevant,
wrote a SQL query against it, and returned a polished chart. Daily visits, it
said, were down 64% over the last 90 days.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/vp-site-traffic-reminder.webp" class="column-page" loading="lazy" data-fig-alt="A chat interface shows the question “how is traffic trending for our site?” The agent answers that daily visits are down 64 percent and displays a sharply declining line chart." width="1280" height="720" />
<p>The variation looks a little tight, and the bend is a little sharp. Is there
any possible reason we might see that bend other than a genuine change in site
traffic?</p>
<p>It turns out that a version of Chrome released 45 days earlier fired the
page-view event differently, so it was not aggregated correctly in the
database. As people updated Chrome, it appeared that site visits were trending
down. This was not even the table the data science team used to track site
traffic.</p>
<p>But you are not there! Your VP sees this chart and takes it to the rest of the
leadership team. They decide to restructure the organization and spend millions
of dollars to reverse the trend.</p>
<p>A month later, somebody asks, &ldquo;Could you recreate that chart? Let&rsquo;s see how
things are trending now.&rdquo; The agent cannot find it. Many coding agents delete
conversation histories after 30 days, and they often do data analysis in
temporary files so they do not clutter the project directory. The source code
for the analysis is long gone.</p>
<p>The coding agent offers to recreate the chart. It looks around the workspace,
finds a table, and runs some SQL. The number was going up the whole time.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/site-traffic-recreated.webp" class="column-page" loading="lazy" data-fig-alt="A chat interface cannot find the earlier conversation or its files. After recreating the analysis with a different warehouse table, it reports that daily visits increased 22 percent and shows an upward-trending chart." width="1280" height="720" />
<p>This is a fictional story, but we&rsquo;e seen situations like this internally
at Posit and at many of the organizations we work with. It is becoming normal
to <em>vibe-analyze</em> data: ask an agent a question, receive a plausible answer,
and move on without understanding how it was produced.</p>
<h3 id="the-tension-between-correctness-and-convenience-is-not-new">The tension between correctness and convenience is not new
</h3>
<p>Posit CTO Joe Cheng summarized the current moment this way:</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/convenience-versus-correctness.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide displays the quotation “In the battle between convenience and correctness, convenience is winning,” attributed to Joe Cheng, Posit CTO." width="1280" height="720" />
<p>AI has broadened the group of people who can convincingly do data analysis, but
many may have no idea what data scientists go through to produce a trustworthy
analysis.</p>
<p>Joe said this a month before the keynote, but he could have said it seven years
ago. In 2019, the beverage company Conviviality disclosed that <a href="https://www.accountingweb.co.uk/business/management-accounting/convivialitys-spreadsheet-hell-sinks-the-business" target="_blank" rel="noopener">a spreadsheet
arithmetic error had contributed £5.2 million to a £14 million forecasting
mistake</a>.
When that &ldquo;innocent spreadsheeting mistake&rdquo; came to light, the business sank.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/conviviality-spreadsheet-error.webp" class="column-page" loading="lazy" data-fig-alt="A news article about Conviviality reporting a spreadsheet arithmetic error that contributed 5.2 million pounds to a 14 million pound forecasting error." width="1280" height="720" />
<p>Or Joe could have said it 20 years ago, when <a href="https://www.science.org/doi/10.1126/science.314.5807.1856" target="_blank" rel="noopener">a sign error in closed-source
protein-modeling
software</a> sent a
research field down the wrong path. A lab published landmark study after
landmark study while other labs struggled to reproduce its findings. Only
after another lab found a protein structure that was nearly a mirror image of
one that the first lab had published did the first lab audit its source code.
They found a negative sign where it did not belong and retracted five papers.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/protein-modeling-software-error.webp" class="column-page" loading="lazy" data-fig-alt="A Science article titled &#39;Error prompts retractions&#39; describing a sign error in protein-modeling software." width="1280" height="720" />
<p>There were threats to correctness in data analysis long before AI. Posit&rsquo;s
stance has never been that people must sacrifice convenience for correctness.
While preparing the talk, I found this quote in a blog post old enough to
refer to itself as a &ldquo;weblog&rdquo;:</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/trustworthy-and-intuitive.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide quotes JJ Allaire: “Our goal is to develop a powerful tool that supports trustworthy, high quality analysis. At the same time, we want RStudio to be as straightforward and intuitive as possible.”" width="1280" height="720" />
<p>JJ was saying that a tool could be both correct and convenient. (By
convenient, we do not mean 7-Eleven. We mean straightforward and intuitive.😜)</p>
<p>Can we take the same stance toward AI? Is it possible to make data analysis
agents that are both correct and convenient for end users?</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/correct-and-convenient.webp" class="column-page" loading="lazy" data-fig-alt="Two overlapping circles, one blue and one orange, form a Venn diagram above the words &#39;Correct and convenient.&#39;" width="1280" height="720" />
<h2 id="why-build-ai-tools-at-all">Why build AI tools at all?
</h2>
<p><strong>(Sara)</strong></p>
<p>This pull between correctness and convenience has been on our minds throughout
the new, exciting age of LLMs. In 2025 and early 2026, AI started to feel
really, really convenient for data analysis. That made us worry about
correctness.</p>
<p>In August 2025, when we released Databot, our state-of-the-art exploratory data
analysis agent, we did so under what was essentially a warning label. The
release post was one of the first things I worked on after joining the AI team,
and it gave me the chance to do something I think I am particularly good at:
be pessimistic.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/databot-flotation-device.webp" class="column-page" loading="lazy" data-fig-alt="A split slide dated August 2025 shows an illustration of the Databot mascot wearing a bright orange flotation device." width="1280" height="720" />
<p>We were all really excited about Databot. It felt like flying through your
data, gathering insights faster than you thought would ever be possible. It was
precisely that convenience that worried us. People might trust it because they
were having so much fun, even when it was wrong. So we wrote an entire article
detailing basically every way we thought Databot might fail.</p>
<p>If you were at posit::conf(2025), you might remember Joe Cheng describing it as
both the most exciting and the most dangerous software he had worked on in his
30-year career.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/exciting-and-dangerous.webp" class="column-page" loading="lazy" data-fig-alt="A quotation from Joe Cheng says that Databot is both the most exciting software and the most dangerous software he has worked on in his 30-year career." width="1280" height="720" />
<p>That raises a fair question, one we contemplate ourselves on a weekly basis:
If AI causes all this chaos and makes all these mistakes, why are we doing
this? Why involve ourselves at all?</p>
<p>There are many answers. We&rsquo;ll focus on one.</p>
<h3 id="curiosity-and-exploration">Curiosity and exploration
</h3>
<p>Before joining the AI team, I taught data science. One thing that always
struck me was what brought people with very different backgrounds into the
field. The thing that united many of them was a sense of curiosity. Maybe they
were curious about a scientific field, computers, statistics, or how R and
Python themselves work. Data rewards that curiosity: There are datasets on
almost everything.</p>
<p>But even as an undergraduate who knew some statistics and a little R, I often
felt like I was looking at an ocean from above. The dataset was right in front of
me, and I knew there was so much going on, but I just couldn&rsquo;t see it.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/mission-ocean.webp" class="column-page" loading="lazy" data-fig-alt="An aerial photograph shows pale blue ocean water meeting a sandy shoreline, with a small dark shape visible below the surface." width="1280" height="720" />
<p>As a graduate student, I learned the tidyverse and more about data science. As
I got better at using those tools, I finally felt like I had what I needed to
ask and answer questions about my data.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/below-the-surface.webp" class="column-page" loading="lazy" data-fig-alt="A split slide pairs the words &#39;The right tools let us see below the surface&#39; with a photograph of rays swimming underwater." width="1280" height="720" />
<p>The right tools let us see below the surface. They enable that curiosity.</p>
<p>That same curiosity motivates our work now. We are curious about how these
models work, how we can build things around them to make them work better, and,
maybe most importantly, how we can turn them into tools that open new worlds of
analysis. For us, AI is a continuation of work we have always done: finding new
ways to explore data.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/ai-as-continuation.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide reads, &#39;AI is a continuation of our work to find new ways to explore data,&#39; with &#39;continuation&#39; and &#39;new ways to explore data&#39; highlighted." width="1280" height="720" />
<h3 id="the-models-got-better">The models got better
</h3>
<p>I also wanted to spend some time on what has changed since August 2025, when
we released that warning-label image. One major thing happened: The models got
better.</p>
<p>About a year before the keynote, we ran an experiment to understand how well
models interpret plots. We showed them plots based on a transformed diamonds
dataset and asked them to describe what they saw.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench-counterintuitive-plot.webp" class="column-page" loading="lazy" data-fig-alt="A scatterplot shows diamond price decreasing as carat increases. An overlaid model response incorrectly says there is a strong positive relationship, followed by the question of whether models can interpret plots that contradict their expectations." width="1280" height="720" />
<p>The models gave answers like, &ldquo;There is a strong positive relationship between
carat and price.&rdquo; That sounds plausible until you look at the plot, which shows
the opposite. Behind the scenes, we had manipulated the data to reverse a
canonical relationship, so larger diamonds were, unintuitively, less expensive.</p>
<p>We wanted to know whether the models could see what was in front of them and
interpret plots that contradicted their expectations. A year ago, the answer
was largely no.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench-november-2025.webp" class="column-page" loading="lazy" data-fig-alt="A horizontal stacked bar chart titled “Models often report what they expect to see, not what’s plotted.” GPT-5, Gemini Pro 2.5, and Claude Sonnet 4.5 are mostly marked incorrect." width="1280" height="720" />
<p>In November 2025, even the best models of the time were abysmal at this task.
They said what they expected to see instead of paying attention to what was
actually happening in the plot.</p>
<p>We tried all sorts of interventions to improve the
<a href="https://posit-dev.github.io/bluffbench/" target="_blank" rel="noopener">bluffbench</a> scores, and absolutely
nothing worked. Then we waited six months.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench-september-2026.webp" class="column-page" loading="lazy" data-fig-alt="A horizontal stacked bar chart titled “Models got better at interpreting counterintuitive plots.” Recent thinking models have much larger correct segments than models evaluated in 2025." width="1280" height="720" />
<p>By May 2026, the major AI companies were releasing models that
were noticeably better at the task. By September, the numbers had jumped dramatically:
The models could interpret these counterintuitive plots.</p>
<p>The models got better. That does not mean data science is solved.</p>
<h3 id="models-still-make-mistakes">Models still make mistakes
</h3>
<p>After that experiment, we asked another question: Can models identify
data-quality issues in visualizations? In
<a href="https://github.com/posit-dev/bluffbench2" target="_blank" rel="noopener">bluffbench2</a>, we again showed them
plots and asked what they saw.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench2-data-artifact.webp" class="column-page" loading="lazy" data-fig-alt="A scatterplot of sleep hours against stress score has an overall negative trend. Within the cloud, a suspicious subset of points falls exactly along a straight line." width="1280" height="720" />
<p>If you look carefully, there&rsquo;s a suspiciously straight line through the cloud
of points. If we really cared about this data, that&rsquo;s something to investigate: Did something weird happen when the data was
created? We wanted to know whether models would do the same.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench2-results.webp" class="column-page" loading="lazy" data-fig-alt="A horizontal bar chart titled “Frontier models still struggle to notice subtle data quality issues.” Every evaluated model scores below 50 percent." width="1280" height="720" />
<p>It turns out they don&rsquo;t really. Even the leading models were not very good at
this task. They struggle to notice subtle data-quality issues.</p>
<p>But there&rsquo;s another problem. Data analysis is not just you, plus a good model,
plus your data. It also depends on context that is not necessarily in your CSV
file, warehouse table, or JSON file.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/context-outside-the-data.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide reads, &#39;Data analysis depends on context that is not in the data,&#39; with the word &#39;context&#39; highlighted." width="1280" height="720" />
<p>All data is constructed. It all has context. That context
might live in a data dictionary, a Markdown file, or a semantic view. Maybe it
just lives in the head of a coworker who has been at the organization for 15
years, knows absolutely everything, and has never written a single thing down.</p>
<p>That context is not inherently inaccessible to models. We could give it to
them. But it has to be in the right format, it has to be curated, and it has to
itself be correct.</p>
<p>So the models have gotten better, but data analysis with AI is not solved. The
question then becomes: How do we make AI-involved analysis correct?</p>
<h2 id="how-do-we-make-ai-for-data-analysis-trustworthy">How do we make AI for data analysis trustworthy?
</h2>
<p><strong>(Sara)</strong></p>
<p>Here&rsquo;s a common thought about AI: It&rsquo;s untrustworthy, but useful. To make it
trustworthy, we need to add in a person.</p>
<p>Here&rsquo;s a simple version of what that might look like. The agent or model does stuff, probably writes a bunch of code. A person then looks at that code and verifies, approves, or
redirects as needed. That feeds back into the agent. This intuitively can feel really appealing. The agent gets to do what it&rsquo;s
good at, the person does what they&rsquo;re good at, and there&rsquo;s an expert there to keep everything
from going off the rails.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/human-in-the-loop.webp" class="column-page" loading="lazy" data-fig-alt="A diagram presents a common division of labor in which an AI system produces work and a human verifies or supervises it." width="1280" height="720" />
<p>And so it&rsquo;s kind of tempting to apply this pattern everywhere. Any time the agent might make
a mistake, we have a person there to clean it up and make sure nothing bad
happens. We call this relatively simplistic view the <em>slap a human on it</em>
approach.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/slap-a-human-on-it.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide shows a roll of black repair tape, used as a metaphor for attaching a human reviewer to an AI system without designing the interaction." width="1280" height="720" />
<p>In this approach, you don&rsquo;t really think very much about what the person will actually do. How will
they apply their expertise? What is the purpose of their involvement? How will
we keep them from technically being in the loop but without actually applying
their expertise?</p>
<p>I&rsquo;m being a bit facetious, but this isn&rsquo;t that far from how we wrote risk mitigation with Databot a year earlier. We said that
Databot and LLMs were not at a point where users could abdicate responsibility.
You still needed all of your data skills to catch errors, interpret results in
context, and avoid being misled by confident but incorrect claims.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/user-responsibility.webp" class="column-page" loading="lazy" data-fig-alt="A quotation over a beach image says that people cannot abdicate responsibility or suspend skepticism when working with LLMs and that their expertise helps them catch errors and avoid confident but incorrect claims." width="1280" height="720" />
<p>And all of that is still true! But
we never said <em>how</em> this was supposed to happen. We assumed that if an expert
was there, they would catch the mistakes.</p>
<p>But just adding a person doesn&rsquo;t really guarantee a better result. Human&ndash;AI combinations do
not reliably outperform the better of the human or AI working
alone.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/human-ai-evidence.webp" class="column-page" loading="lazy" data-fig-alt="A slide reads, &#39;Adding a human does not guarantee a better result,&#39; followed by points about human-AI performance, approval fatigue, trust, timing, cognitive load, social cues, and information design." width="1280" height="720" />
<p>People also get tired of approving requests, and then they stop reading them.
Think about the last time your coding agent showed you a command to approve.
Did you carefully read it, or did you hit approve as quickly as possible and
feel annoyed that it even bothered to ask?</p>
<p>Human decision-making is not fixed. How much you trust the system, how much you
trust the people who built it, the timing of the information, your cognitive
load, and how much your coworkers trust the agent can all influence the
decision you make. Even if you are an expert who makes the right decision
outside an interaction with an agent, adding the agent might change that
decision.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/people-are-not-fixed.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide reads, &#39;People are not fixed safety components,&#39; with the final phrase highlighted." width="1280" height="720" />
<p>So how do we design the entire system to produce correct work? How do we build
trust and correctness into the agent itself, and design interactions with
users that actually support their expertise?</p>
<p>That maps onto two principles we returned to throughout the talk:</p>
<ol>
<li>Help the agent be correct.</li>
<li>Make it less bad when the agent is wrong.</li>
</ol>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/agent-correctness-goals.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide reads, &#39;Help the agent be correct&#39; and &#39;Make it less bad when the agent is wrong.&#39;" width="1280" height="720" />
<h2 id="posit-assistant">Posit Assistant
</h2>
<p><strong>(Simon)</strong></p>
<p><a href="https://pos.it/assistant" target="_blank" rel="noopener">Posit Assistant</a> is Posit&rsquo;s coding and data science
agent. It is available in RStudio, Positron, and the terminal. When it is
running inside an IDE, it works in the same R or Python session you&rsquo;re using.
You can use whatever model you want from whatever provider you have access to.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/posit-assistant.webp" class="column-page" loading="lazy" data-fig-alt="A blue slide displays the Posit Assistant wordmark and orange circular logo." width="1280" height="720" />
<p>For the demo, I returned to one of my first experiences of seeing below the
surface with data science. In an introductory statistics class, I analyzed
flight data to understand whether I could book tickets that were less likely
to be delayed. I used ggplot2 and dplyr, pushing data frames around and
visualizing them.</p>
<p>I asked Posit Assistant to find an R package with Houston flight data and
retrieve data from the previous year. It found <code>anyflights</code>, read its
documentation, and generated the correct call.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant searches for an R package that provides data about flights from Houston.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-web-fetch.mp4" type="video/mp4">
</video>
<p>Next, I asked it to grab data from the same time the previous year. The agent read the package documentation and so was able to write the code with the right arguments the first time.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant reads the anyflights package documentation and writes code to retrieve Houston flight data.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-docs.mp4" type="video/mp4">
</video>
<p>We have seen that many coding agents have a superficial relationship with data quality, and we wondered whether we could do better. Posit
Assistant proactively recommends cleaning the data and has a dedicated data-cleaning mode. It runs scratch code to look for
missing values, outliers, and similar issues. Once it finds them, it surfaces questions to the user in an interactive dialog.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant enters data-cleaning mode, asks the user about missing values and outliers, and records the decisions in a persistent cleaning script.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-clean-data.mp4" type="video/mp4">
</video>
<p>In the demo, the agent found missing values in a relevant column, then found some flights with departure delays of multiple days. I chose to keep both:
Those outliers represented what really happened.</p>
<p>At the end of cleaning mode, the agent wrote a persistent file in the project
directory to ingest and clean the data. When someone revisits the analysis,
they can reproduce those steps.</p>
<p>Posit Assistant also shows plots inside the conversation. It is nice to be able to see them, but we
also think it is necessary: Our evaluations show that agents cannot reliably
interpret plots. When one carrier appeared unusually delayed, it checked the sample size
and found only 32 flights, suggesting that we should not read too much into the
pattern.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant plots departure delays by carrier, checks the sample size behind an apparent anomaly, and finds that the carrier has only 32 flights.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-carriers.mp4" type="video/mp4">
</video>
<p>Once the analysis was complete, I asked the agent to turn it into a persistent
Quarto report.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant uses a specialized skill to turn the flight-delay analysis into a persistent Quarto report.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-report.mp4" type="video/mp4">
</video>
<p>I have one more &ldquo;little zoomy zoom&rdquo;: The entire conversation cost five cents.
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="The Posit Assistant conversation displays the selected GLM 5.3 Flash model, token usage, and a total cost of five cents."><source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-model-cost.mp4" type="video/mp4"></video></p>
<p>Part of our mission at Posit is to provide tools to people regardless of their
economic means.</p>
<p>Posit Assistant is designed to be
token-efficient and can use capable, inexpensive open-weight models such as GLM
5.3 Flash through Posit AI Pass. We spend a lot of time
watching the open-weights model space for models on the Pareto frontier:
capable of data analysis and orders of magnitude cheaper than frontier models.</p>
<p>Returning to the two principles, part of helping the agent be correct is, quite
literally, asking nicely. We say, &ldquo;Pretty please pay attention to data
cleanliness. Pretty please be open to uncertainty when carrying out data
analysis.&rdquo;</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/posit-assistant-correctness.webp" class="column-page" loading="lazy" data-fig-alt="A slide says to help the agent be correct by encouraging sound statistics and reproducibility practices, and make errors less bad by using the user&#39;s expertise and sharing an R or Python environment." width="1280" height="720" />
<p>We also design interactions around the user&rsquo;s expertise: Cleaning mode asks
about the data-generating process, plots remain visible, and the user shares
the agent&rsquo;s R or Python session.</p>
<p>Posit Assistant assumes that the user is a data scientist, analyst, or someone
else who writes code and wants to work in an IDE, close to that code. But what
if the user is not a data scientist? How do we help them get correct answers,
too?</p>
<h2 id="introducing-commons">Introducing commons
</h2>
<p><strong>(Sara)</strong></p>
<p>Let&rsquo;s return to our vibe-analyzing VP. I think it&rsquo;s easy to say, &ldquo;They just
shouldn&rsquo;t be doing this kind of analysis.&rdquo; But let&rsquo;s be on their side for a
moment. They had a question, they wanted it answered, and so they&rsquo;re going to
reach for a tool that gives them an answer.</p>
<p>The problem is that they reached for the wrong tool and it gave them the wrong answer.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/vp-site-traffic-reminder.webp" class="column-page" loading="lazy" data-fig-alt="A chat interface shows the VP asking how traffic is trending for the site. The agent reports that daily visits are down 64 percent and displays a sharply declining line chart." width="1280" height="720" />
<p>The data team already has vetted, maintained code that computes site traffic
correctly. We call this <em>trusted code</em>. Trusted code might live in a package, Shiny app,
Quarto document, report, or dashboard.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/trusted-code.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide displays the words &#39;Trusted code,&#39; with &#39;Trusted&#39; highlighted in orange." width="1280" height="720" />
<p>Instead of having the model write bespoke code from scratch every time someone
asks a question, what if it could use that trusted code?</p>
<p>This is one of the core ideas behind a new open-source package that we&rsquo;re
excited to share with you all today. It&rsquo;s called commons.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons.webp" class="column-page" loading="lazy" data-fig-alt="A blue slide displays the orange commons bird logo and a link to pos.it/commons." width="1280" height="720" />
<p><a href="https://pos.it/commons" target="_blank" rel="noopener">commons</a> helps data scientists build trustworthy data
agents for their collaborators. It is an open-source R and Python package built
on the ellmer, chatlas, and shinychat stack.</p>
<p><strong>(Simon)</strong></p>
<p>Here is how the VP&rsquo;s analysis works with a commons agent. When the VP asks,
&ldquo;How is traffic trending for our site?&rdquo; the first thing the agent does is
search for a trusted calculation. If it finds one that answers the question,
it invokes that calculation directly.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="A commons agent answers a site-traffic question by running a trusted calculation, displaying a chart showing a 22 percent increase, and marking the answer with a green shield.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/commons-traffic-trend.mp4" type="video/mp4">
</video>
<p>The calculation returns a plot and a green shield indicating that the answer
came from a trusted calculation. commons adds that marker deterministically;
the agent itself does not control it.</p>
<p>What makes coding agents so convenient is that they are everything tools. They
will write their own R, Python, or SQL code to answer a question. Trusted
calculations cannot cover every question, so commons has a fallback path.</p>
<p>When no trusted calculation exists, the agent can use context authored by the
data team. commons verifies any citation against that context before displaying
its blue citation marker.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="A commons agent charts declining page views, uses trusted context to explain the instrumentation change behind the decline, and displays a blue citation marker.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/commons-page-views.mp4" type="video/mp4">
</video>
<p>If there is neither a trusted calculation nor supporting context to cite, the agent
can write code, but commons displays a yellow warning so the user knows to treat
the answer cautiously.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="A commons agent writes custom code to find the day with the most site visits, then marks the answer with a yellow warning because it did not use a trusted calculation or cite trusted context.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/commons-most-visits.mp4" type="video/mp4">
</video>
<p>Here&rsquo;s a diagram of the various ways the agent can come up with answers and how the trust relationships are mapped.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons-trust-flow.webp" class="column-page" loading="lazy" data-fig-alt="A flow diagram shows commons first searching trusted calculations. A found calculation leads to a verified marker. Otherwise the agent searches context and writes SQL, R, or Python, leading to either a citation marker or a lower-trust warning." width="1280" height="720" />
<p>So far, we&rsquo;ve been talking about the VP&rsquo;s experience with the commons agent. What is it like to work with
commons as a data scientist? There are three main loops: build, deploy, and improve.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons-lifecycle.webp" class="column-page" loading="lazy" data-fig-alt="Three cards describe the commons lifecycle: build by connecting the agent to trusted code, deploy it for colleagues on Connect, and improve it by reviewing behavior and covering common use cases." width="1280" height="720" />
<p>With data collection enabled, data scientists can review cases where the agent
had to write its own code. If those cases share a pattern, they can add trusted
code that moves future responses up the trust ladder, making the agent more
correct over time.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons-correctness.webp" class="column-page" loading="lazy" data-fig-alt="A slide says to help the agent be correct with trusted calculations and context, and make errors less bad by signaling trust and introducing feedback loops." width="1280" height="720" />
<p>Returning to our two principles, commons helps the agent be correct by letting
it directly use trusted code. It makes mistakes less bad by telling the user
when the agent did not directly use trusted code, and by moving responses up
the trust ladder over time.</p>
<h3 id="other-use-cases-for-commons">Other use-cases for commons
</h3>
<p><strong>(Sara)</strong></p>
<p>The VP example is business intelligence, but commons is not only for BI or
vice presidents. It&rsquo;s for any data person who wants to build an agent that
gives correct answers to their collaborators.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons-examples.webp" class="column-page" loading="lazy" data-fig-alt="A table pairs a biostatistician with a physician comparing treatment groups, a UX researcher with a product manager summarizing experiment results, and a policy analyst with a program lead simulating a policy&#39;s budget impact." width="1280" height="720" />
<p>We&rsquo;ve made a sample <a href="https://pos.it/clinical-trials-agent" target="_blank" rel="noopener">clinical trials
agent</a> to highlight this functionality.
Its data is simulated. The trusted code is a TLG catalog: code written and
trusted by data people to work on this type of data and produce correct
answers. You can ask it questions such as, &ldquo;Plot Kaplan&ndash;Meier curves.&rdquo;</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="A clinical trials agent runs a trusted calculation for the safety population and produces a Kaplan–Meier plot of serious adverse-event-free probability.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/clinical-trials-agent-demo.mp4" type="video/mp4">
</video>
<h2 id="it-is-still-very-bad-to-be-wrong">It is still very bad to be wrong
</h2>
<p><strong>(Sara)</strong></p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/conclusion.webp" class="column-page" loading="lazy" data-fig-alt="A blue slide reads “It’s (still) very bad to be wrong” in large cream-colored text." width="1280" height="720" />
<p>It&rsquo;s now so easy to ask any kind of agent a question about your data and get a
wrong answer that looks completely plausible.</p>
<p>The problem is not just that the answer is wrong, and it&rsquo;s also not just that you might be unable to reproduce it or have no
idea how it arrived at the answer.</p>
<p>These are bad enough, but there&rsquo;s another problem. If we become accustomed to, say, 15% of our numbers
being wrong, we might lose trust in analysis itself and its ability to tell us things about the world, or become used to numbers just being a bit wrong all the time.</p>
<p>But correctness matters, especially in particular industries, and Posit has always
built tools to support correct analysis. We do not think that standard should
change just because AI is here.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/conclusion-infrastructure.webp" class="column-page" loading="lazy" data-fig-alt="A blue slide reads, &#39;AI has expanded who can get answers from data. That changes the infrastructure we need for correct, transparent, and reproducible analysis.&#39;" width="1280" height="720" />
<p>But AI has expanded who can get answers from data. Now anyone can ask a
question about their data. That changes how we need to think about the
infrastructure for building correct, transparent, and reproducible agents.</p>
<p>With commons, a data team establishes which code and calculations it trusts
and provides the organizational context the agent needs. The team can give that
agent to someone who might otherwise perform a vibe analysis. That person keeps
the convenience of asking questions in natural language, while the answers are
grounded in the data team&rsquo;s trusted work and can be traced and reproduced.</p>
<p>That is where data scientists and analysts come in. This infrastructure must be
built by people who understand the data, calculations, and organization.
commons helps them build it and make it available to others.</p>
<h2 id="looking-forward">Looking forward
</h2>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/canvas.webp" class="column-page" loading="lazy" data-fig-alt="A Canvas application displays a polished data-analysis workspace with an agent conversation, visual results, and interactive controls arranged across a large visual canvas." width="1280" height="720" />
<p>Looking forward, we have been experimenting with something called Canvas.</p>
<p>Canvas is a next-generation agent experience. It assumes that you might not
always want to look at the code. That does not mean the code is not there when
you need it, but you might not always want to work in an IDE.</p>
<p>This frees up real estate for expansive, new agent-collaboration interfaces.
Canvas feels a little aggressively agentic to us, in the way Databot felt a
year ago.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/thank-you.webp" class="column-page" loading="lazy" data-fig-alt="A green slide says &#39;Thank you!&#39; above resource cards linking to the keynote slides, commons, and the AI Newsletter." width="1280" height="720" />
<h3 id="recent-past-newsletters">Recent past newsletters
</h3>
<ul>
<li><a href="https://opensource.posit.co/blog/2026-09-18_ai-newsletter">New releases from ellmer, shinychat, and commons</a></li>
<li><a href="https://opensource.posit.co/blog/2026-09-04_ai-newsletter">You probably don&rsquo;t want to fine-tune</a></li>
</ul>
<p><a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener noreferrer" class="btn-shortcode inline-flex mb-5 mr-5 items-center px-4 py-3 text-sm leading-5 gap-2 rounded-lg bg-blue-400 !text-white font-semibold align-middle hover:bg-blue-500 transition no-underline">Subscribe via RSS</a></p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/hero.webp" length="15396" type="image/webp" />
    </item>
    <item>
      <title>Genomes, Prompts, and Shiny: What I Built During My Summer at Posit</title>
      <link>https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/</link>
      <pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/</guid>
      <dc:creator>Samuel Bharti</dc:creator>
      <dc:creator>Shiny Team</dc:creator>
      <dc:creator>Barret Schloerke</dc:creator>
      <dc:creator>Carson Sievert</dc:creator>
      <dc:creator>Joe Cheng</dc:creator><description><![CDATA[<p>My name is Samuel Bharti and I am a PhD candidate at the University of Alabama at Birmingham, working on rare diseases and cancers, particularly focusing on Neurofibromatosis Type 1 and the cancers associated with it. I spent this summer as a software engineering intern on the Shiny team at Posit. In three short months, I built <strong>10 open-source applications and 5 supporting packages</strong> for computational biology, across R, Python, TypeScript, and JavaScript. Some are tools researchers can use directly. Others sit underneath those applications and solve recurring infrastructure problems.</p>
<p>I came into the internship as a computational biologist. In my PhD research, I work with single-cell sequencing, genomics, and multi-omics data, and with the public databases and identifiers that come with them.</p>
<p>Across different projects, I kept running into the same problems:</p>
<ul>
<li>Biological datasets are getting enormous.</li>
<li>The information needed to interpret them is scattered across many databases.</li>
<li>Identifiers are surprisingly inconsistent.</li>
<li>The same API and data-access logic gets rewritten again and again.</li>
<li>Even when excellent public datasets exist, there can still be a huge gap between <strong>the data being available</strong> and <strong>a researcher being able to use it comfortably</strong>.</li>
</ul>
<p>Those gaps became the theme of my summer.</p>
<blockquote>
<p>How do we make increasingly large and complicated biological datasets genuinely usable for researchers?</p>
</blockquote>
<h2 id="making-enormous-biological-datasets-explorable">Making enormous biological datasets explorable
</h2>
<p>One of the projects I am most excited about is <a href="https://posit-tahoe-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Tahoe Explorer</strong></a> (<a href="https://github.com/samuelbharti/tahoe-explorer" target="_blank" rel="noopener">source</a>).</p>
<p><a href="https://huggingface.co/datasets/tahoebio/Tahoe-100M" target="_blank" rel="noopener">Tahoe-100M</a> contains more than 100 million single-cell perturbation profiles. That scale is scientifically exciting, but it creates a practical problem: you cannot treat 100 million observations like a normal dataframe inside an interactive application.</p>
<p>I wanted researchers to be able to answer basic questions before committing to a large analysis. Which cell lines are represented? Which drugs were tested? How much coverage exists for the combination I care about? What do we know about the genomic background of those cell lines? And once I find what I need, how do I retrieve only that part of the dataset?</p>
<p>Tahoe Explorer lets researchers move through drugs, cell lines, samples, genes, coverage, and cell-level metadata without first downloading and loading the entire resource. For the larger data, queries are pushed down to DuckDB, which returns only the rows or summaries the current view needs.</p>
<p>I integrated additional information from resources such as <a href="https://depmap.org/portal/" target="_blank" rel="noopener">DepMap</a> and <a href="https://www.cellosaurus.org/" target="_blank" rel="noopener">Cellosaurus</a>, including variant information for the cell lines. That makes it possible to think about perturbation response alongside the genomic context of each cell line.</p>
<p>The Subset builder tab then turns exploration into something reproducible. Users can define the experiment they care about and generate R or Python code for retrieving that subset later.</p>
<p>Another feature of the app is the built-in chat assistant. It can help researchers reason about Tahoe, identify useful filters, interact with supported parts of the app, and finally build those reproducible subset recipes.</p>
<p>What I like most is that the assistant lives inside the app. It can use tools over the data and help operate the workflow. To me, that is a much more interesting direction for AI in scientific software.</p>
<div class="not-prose">
<figure>
<a href="https://posit-tahoe-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/tahoe-explorer.gif" alt="An animation of Tahoe Explorer. On the Overview tab, the tiles show 100.6M cells, 50 cell lines and 379 drugs, and clicking the Breast bar in the cell lines by organ chart filters the table to HS-578T and BT-474. The Coverage tab shows a heatmap of the cells profiled for each drug and cell line. On the Subset builder tab, the assistant panel opens and is asked to build a breast cancer subset. It replies that it selected Organ: Breast in the Subset builder, names BT-474 and HS-578T, estimates 3,094,027 cells across 1,344 samples, and writes R and Python code to pull them, while the tiles change to 3.1M cells and 2 cell lines." title="A quick tour of the Overview and Coverage tabs, then the assistant setting a filter in the Subset builder and reporting what the selection covers." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">A quick tour of the Overview and Coverage tabs, then the assistant setting a filter in the Subset builder and reporting what the selection covers.</figcaption>
</figure>
</div>
<p>The Tahoe app solved one type of scaling problem: accessing and understanding a dataset that is much larger than the application itself. One layer later, the same issue came back, with the <strong>visualization itself</strong> as the bottleneck.</p>
<p><a href="https://opensource.posit.co/software/plotomics/"><strong>plotomics</strong></a> and <a href="https://posit-plotomics-live.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Plotomics Live</strong></a> (<a href="https://github.com/samuelbharti/plotomics-live" target="_blank" rel="noopener">source</a>) came out of that bottleneck.</p>
<p>plotomics is a visualization library for computational biology with a shared TypeScript rendering core and wrappers for R and Python. Its 17 components cover embeddings, heatmaps, volcano plots, networks, oncoplots, genomic views, spatial data, survival analysis, and other common biological visualizations. Of those, 15 ship in R, Python, and JavaScript; the two genome browsers are JavaScript and Python only.</p>
<p>For large visualizations, the browser can draw with WebGL or Canvas. Numeric data can also move to the frontend as binary buffers instead of being serialized into huge JSON payloads.</p>
<p>The visualization logic exists once. The R, Python, and JavaScript wrappers all talk to the same rendering engine.</p>
<p>I built <strong>Plotomics Live</strong> to explore how far that model could go inside Shiny.</p>
<p>The app contains 26 biological visualizations, built from those 17 components with several of them used more than once, across single-cell data, spatial transcriptomics, genomics, networks, perturbation data, and other common workflows. Every one of them renders two ways, and an engine toggle puts the GPU-accelerated React component beside the server-rendered ggplot2 image so you can compare them directly.</p>
<p>One page, for example, interactively renders more than half a million real single-cell observations in the browser.</p>
<p>Plotomics Live is where I worked out what Shiny can look like when R remains the analytical engine and the browser does more of the work it is good at.</p>
<div class="not-prose">
<figure>
<a href="https://posit-plotomics-live.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/plotomics-live.gif" alt="An animation of Plotomics Live. On the Visium spatial transcriptomics page, capture spots in eleven color-coded clusters sit over a breast cancer tissue section, above a footer reading 3,798 capture spots, 11 clusters, 72 genes in panel. The spot opacity slider fades the spots to show the H&amp;E-stained tissue underneath, then brings them back. The coloring switches to ERBB2 expression, and the engine toggle swaps the Shiny React component for the ggplot2 (classic) image. The animation then moves to the Protein structure page, where the AlphaFold model of TP53, colored by pLDDT confidence, turns." title="Two of the 26 pages. The engine toggle swaps the React component for the ggplot2 image, over the same server-side computation." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">Two of the 26 pages. The engine toggle swaps the React component for the ggplot2 image, over the same server-side computation.</figcaption>
</figure>
</div>
<h2 id="connecting-biological-information-that-lives-everywhere">Connecting biological information that lives everywhere
</h2>
<p>Scale was only one recurring problem. The other was fragmentation.</p>
<p>A lot of computational biology does not involve one database or one algorithm. It involves assembling an answer from many different resources.</p>
<p>Variant interpretation is a good example. If I am reviewing a variant, I may want information from <a href="https://www.ncbi.nlm.nih.gov/clinvar/" target="_blank" rel="noopener">ClinVar</a>, <a href="https://gnomad.broadinstitute.org/" target="_blank" rel="noopener">gnomAD</a>, <a href="https://www.ensembl.org/" target="_blank" rel="noopener">Ensembl</a>, <a href="https://www.uniprot.org/" target="_blank" rel="noopener">UniProt</a>, <a href="https://alphafold.ebi.ac.uk/" target="_blank" rel="noopener">AlphaFold</a>, <a href="https://platform.opentargets.org/" target="_blank" rel="noopener">Open Targets</a>, <a href="https://www.dbnsfp.org/" target="_blank" rel="noopener">dbNSFP</a>, <a href="https://www.ebi.ac.uk/ProtVar/" target="_blank" rel="noopener">ProtVar</a>, and several other sources.</p>
<p><a href="https://posit-variant-reviewer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Variant Reviewer</strong></a> (<a href="https://github.com/samuelbharti/variant-reviewer" target="_blank" rel="noopener">source</a>) brings those sources together in one reactive workflow.</p>
<p>A researcher can start from a gene, a variant, or both, and the app combines clinical significance, population frequency, prediction scores, gene constraint, protein domains and 3D protein structure.</p>
<div class="not-prose">
<figure>
<a href="https://posit-variant-reviewer.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/variant-reviewer.gif" alt="An animation of Variant Reviewer. Loading the BRAF V600E example fills the gene and variant boxes, and Review fills the cards: BRAF on the gene card, chr7:g.140753336A&gt;T and p.Val600Glu on the variant card, UniProt P15056 at position 600 on the protein card, and conflicting classifications of pathogenicity on the ClinVar card. The assistant on the right is then asked what ClinVar and gnomAD say about this variant, and answers with the ClinVar classification and its conditions and a gnomAD exome frequency of 2 in 1,460,618 alleles." title="One gene, one variant, one page. Each card is a different public service." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">One gene, one variant, one page. Each card is a different public service.</figcaption>
</figure>
</div>
<p>But building Variant Reviewer surfaced another problem. Every external biological service behaves differently: its own identifiers, its own failure modes, its own rate limits. One might return a clean &ldquo;not found&rdquo; response while another throws an error. And one slow or unavailable service should not break the entire application.</p>
<p>Once I started solving those problems in one app, it became apparent that I should not keep solving them separately.</p>
<h2 id="building-the-infrastructure-once">Building the infrastructure once
</h2>
<p>Five packages grew out of problems that kept appearing across the applications.</p>
<h3 id="biobouncer">biobouncer
</h3>
<p><a href="https://opensource.posit.co/software/biobouncer/"><strong>biobouncer</strong></a> handles biological identifier validation. Gene symbols change. Ontology identifiers have different namespaces. Variants can be syntactically valid but biologically meaningless. Public databases each have their own identifier conventions.</p>
<p>biobouncer provides a common layer for validating these inputs using pattern checks, cached resources, remote validation, and existence checks. It also has implementations across R, Python, and TypeScript backed by the same conformance data.</p>
<p>If the same identifier moves through an R pipeline, a Python analysis, and a web interface, I want &ldquo;valid&rdquo; to mean the same thing everywhere.</p>
<h3 id="biohttp">biohttp
</h3>
<p><a href="https://opensource.posit.co/software/biohttp/"><strong>biohttp</strong></a> handles the repetitive infrastructure around external APIs. Retries, throttling, caching, batching, timeouts, circuit breaking, and structured errors should not need to be rebuilt in every scientific application.</p>
<p>It also makes an important distinction between a service successfully returning no biological result and the service itself failing. That sounds small until an application depends on several external databases at once.</p>
<h3 id="bioclients">bioclients
</h3>
<p><a href="https://opensource.posit.co/software/bioclients/"><strong>bioclients</strong></a> sits on top of that transport layer and provides R clients for 29 biological services. Ensembl, UniProt, gnomAD, Open Targets, ClinVar, AlphaFold, and the rest each get a client that understands the structure and meaning of what they return.</p>
<p>Network requests and response parsing are separated so parsers can be tested against stored responses without requiring a live API.</p>
<p>The separation is intentional:</p>
<ul>
<li><strong>biohttp handles how we talk to a service.</strong></li>
<li><strong>bioclients handles what that biological service returns.</strong></li>
</ul>
<h3 id="plotomics">plotomics
</h3>
<p><strong>plotomics</strong> is the exception in this list. I described it above, because it came out of one specific problem before I was thinking about shared infrastructure at all. It belongs here anyway, for the same reason as the rest: the rendering layer only had to be built once.</p>
<h3 id="biocohort">biocohort
</h3>
<p>Before APIs and visualization even matter, most omics projects have another problem: keeping the study organized. Subjects, samples, assays, species, and the manual corrections made along the way often end up spread across spreadsheets and scripts.</p>
<p><a href="https://opensource.posit.co/software/biocohort/"><strong>biocohort</strong></a> provides a validated study representation for keeping those relationships together. The same manifest can describe multiple assay types and organisms, generate pipeline sample sheets, and preserve corrections that would otherwise disappear inside preprocessing code.</p>
<p>This one is particularly close to my own research because these small bookkeeping problems become very expensive once a project grows.</p>
<p><div class="not-prose"><figure>
    <img class="h-auto max-w-full rounded-lg"
      src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/package-stack.png"
      alt="A diagram. The ten applications are listed as chips inside a dashed box at the top. Below them are five rows, each showing a package&rsquo;s hex sticker next to its name and its job: biobouncer for whether an identifier means anything, biohttp for how we talk to a service, bioclients for what each biological service returns, plotomics for one rendering core in three languages, and biocohort for how a study stays organized."  title="The five packages, and the one question each of them answers." 
      loading="lazy"
    ><figcaption class="text-sm text-center text-gray-500">The five packages, and the one question each of them answers.</figcaption>
  </figure></div>
</p>
<p>This shift from app-specific code to reusable infrastructure was the biggest change in how I approached the internship. Instead of asking, &ldquo;How do I make this app work?&rdquo;, I started asking, &ldquo;Which part of this problem will the next app also need?&rdquo;</p>
<h2 id="from-retrieving-data-to-synthesizing-evidence">From retrieving data to synthesizing evidence
</h2>
<p>Once those pieces became reusable, I could build higher-level research workflows on top of them.</p>
<p><a href="https://posit-gene-list-builder.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Gene List Builder</strong></a> (<a href="https://github.com/samuelbharti/gene-list-builder" target="_blank" rel="noopener">source</a>) came from another task I have done manually many times: starting with a disease and assembling a defensible list of associated genes.</p>
<p>The application resolves the disease to an ontology term, queries multiple gene-disease resources, normalizes the results, removes duplicates, and produces a ranked list using transparent and adjustable source weights.</p>
<p>The evidence comes from the underlying databases, the scoring is visible, and the provenance remains available. An optional AI layer can then help with curation after that deterministic evidence-gathering step.</p>
<p><a href="https://posit-genescout.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>GeneScout</strong></a> (<a href="https://github.com/samuelbharti/genescout" target="_blank" rel="noopener">source</a>) takes the same idea further.</p>
<p>It acts as an evidence-review workbench for evaluating candidate genes in a disease context. Its deterministic layer resolves genes, retrieves public evidence, keeps citations attached, scores the evidence, and applies caveats. An optional agent can then synthesize what was retrieved and suggest follow-up directions.</p>
<p>Both apps rest on the design principle I came away from the summer caring about most:</p>
<p><strong>AI can help interpret scientific evidence without needing to be the source of the evidence.</strong></p>
<div class="not-prose">
<figure>
<a href="https://posit-genescout.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/genescout.gif" alt="An animation of GeneScout. The setup page holds four example gene lists and the study context NF1-associated cancer (MPNST). After Rank genes, the review shows 32 candidates ranked across 12 sources, with EGFR first. Selecting NF1 switches the panel on the right to its composite score of 0.55 and its breakdown by source, from Open Targets association to STRING connectivity. Opening its grounded evidence lists 38 cited items, starting with an Open Targets association with neurofibromatosis type 1." title="Every number in the breakdown traces back to a public source. Curate with AI and Analyze with specialists are separate, optional steps." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">Every number in the breakdown traces back to a public source. Curate with AI and Analyze with specialists are separate, optional steps.</figcaption>
</figure>
</div>
<h2 id="turning-analyses-into-tools-researchers-can-actually-explore">Turning analyses into tools researchers can actually explore
</h2>
<p>I built several more focused applications around common genomics workflows.</p>
<p><a href="https://posit-recount-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Recount Explorer</strong></a> (<a href="https://github.com/samuelbharti/recount-explorer" target="_blank" rel="noopener">source</a>) provides an interactive entry point into <a href="https://rna.recount.bio/" target="_blank" rel="noopener">recount3</a>, allowing researchers to browse uniformly processed RNA-seq studies, inspect quality metrics, explore expression and PCA, and export data, without writing any code.</p>
<p><a href="https://posit-de-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>DE Explorer</strong></a> (<a href="https://github.com/posit-dev/shiny-showcase-bioinformatics/tree/main/apps/de-explorer" target="_blank" rel="noopener">source</a>) makes differential-expression results interactive, moving from a PCA of sample-level structure to a volcano plot, a filterable results table, and a heatmap of the genes you select.</p>
<p><a href="https://posit-signature-scoring.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Signature Scoring</strong></a> (<a href="https://github.com/posit-dev/shiny-showcase-bioinformatics/tree/main/apps/signature-scoring" target="_blank" rel="noopener">source</a>) summarizes expression profiles into pathway-level scores and lets researchers compare those scores across groups before drilling down into the genes driving a pathway.</p>
<p><a href="https://posit-drug-perturbation.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Drug Perturbation</strong></a> (<a href="https://github.com/posit-dev/shiny-showcase-bioinformatics/tree/main/apps/drug-perturbation" target="_blank" rel="noopener">source</a>) explores connectivity between gene-expression signatures and reference perturbations, including potential mimics and reversers across different cellular contexts. Its reference panel is synthetic, built over the TCGA-BRCA gene space.</p>
<p><a href="https://posit-genome-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Genome Explorer</strong></a> (<a href="https://github.com/posit-dev/shiny-showcase-bioinformatics/tree/main/apps/genome-explorer" target="_blank" rel="noopener">source</a>) places recurrent variants into an interactive genomic view and lets users move from cohort-level patterns to individual loci.</p>
<p>These five are deliberately narrower than the applications above. An analysis can end in a tool: a thin Shiny layer turns a computational result into something the researcher who understands the biology can actually explore.</p>
<div class="not-prose">
<figure>
<a href="https://posit-shiny-showcase-bioinformatics.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/focused-apps.png" alt="Five application screenshots in a labelled grid: Recount Explorer, DE Explorer, Signature Scoring, Drug Perturbation, and Genome Explorer. Each shows a populated dashboard, in order a study catalogue, a PCA with threshold controls, a pathway activity contrast, a connectivity leaderboard, and a genome browser above a variant table." title="Five smaller applications, each wrapped around one common genomics workflow." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">Five smaller applications, each wrapped around one common genomics workflow.</figcaption>
</figure>
</div>
<h2 id="working-in-open-source">Working in open source
</h2>
<p>I had worked on open-source software before, but working inside Posit&rsquo;s Open Source group changed how I thought about building research software.</p>
<p>Code review was where a lot of the interesting work happened.</p>
<p>I spent much more time thinking about API design, failure modes, backwards compatibility, and what another developer would experience after I stopped actively working on a project.</p>
<p>That distinction became very clear over the summer:</p>
<p><strong>Making something run once is different from making something other people can depend on.</strong></p>
<p>I got to move well outside the R layer I knew best. Across the summer I worked with R, Python, JavaScript, TypeScript, React, WebGL, Shiny internals, and newer work around <a href="https://github.com/posit-dev/shinyreact" target="_blank" rel="noopener">shinyreact</a>, which the Shiny team introduced in <a href="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/">Introducing shinyreact</a> at the end of September.</p>
<p>Starting the internship at Open Source Work Week in Boston made the whole experience even better. Meeting everyone in person at the beginning made the later remote collaboration feel much more natural.</p>
<p>I am very grateful to <a href="https://opensource.posit.co/people/barret-schloerke/"><strong>Barret Schloerke</strong></a>, <a href="https://opensource.posit.co/people/carson-sievert/"><strong>Carson Sievert</strong></a>, <a href="https://opensource.posit.co/people/joe-cheng/"><strong>Joe Cheng</strong></a>, the rest of the Shiny team, and everyone across Posit who provided feedback, answered questions, challenged ideas, or helped me understand another part of the stack.</p>
<p>I learned a lot from being able to build freely while surrounded by people who know these tools from the inside.</p>
<h2 id="next-for-these-projects">Next for these projects
</h2>
<p>The internship ended, but I do not really think of these projects as finished. They are open source, and many of them solve problems I still encounter in my own research. I hope researchers use them, find things I did not anticipate, and help shape where they go next.</p>
<p>The applications and supporting packages are collected in the <a href="https://github.com/posit-dev/shiny-showcase-bioinformatics" target="_blank" rel="noopener"><strong>Shiny Showcase: Bioinformatics</strong></a> repository, with source code, documentation, examples, and citation information for the individual projects. The <a href="https://posit-shiny-showcase-bioinformatics.share.connect.posit.cloud/" target="_blank" rel="noopener">live gallery</a> links every app to a running deployment you can open in a browser.</p>
<p>I presented this as a talk in August 2026. <a href="https://www.samuelbharti.com/genomes-prompts-shiny/" target="_blank" rel="noopener">The deck</a> covers the same projects in slides, and its <a href="https://github.com/samuelbharti/genomes-prompts-shiny" target="_blank" rel="noopener">source</a> is public.</p>
<p>If you work in computational biology, genomics, or research software, I would genuinely love to hear what is useful and what is missing.</p>
<p>Try an app, use one of the packages, or open an issue if something breaks or could work better. Pull requests are welcome. Or tell me about the research-software problem you keep solving manually.</p>
<p>A lot of this work started exactly that way. I noticed recurring problems in my own research that felt harder than they should be, and I tried to build the tools I wished I already had.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/featured.png" length="413419" type="image/png" />
    </item>
    <item>
      <title>posit::glimpse() Newsletter – October 2026</title>
      <link>https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/</link>
      <pubDate>Wed, 07 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/</guid>
      <dc:creator>Isabella Velásquez</dc:creator><description><![CDATA[<p>Hello, everyone! We’ve officially wrapped up posit::conf(2026), and to everyone who joined us in Houston or online, thank you for making it incredible 💙🧡 Between the keynote reveals, lightning talks, and workshops, it was a lot to take in! In this edition, we’ve rounded up all the major news and announcements in one place.</p>
<p>Want to catch up on talks? While we prepare the videos for YouTube, all session recordings are available now on the event portal:</p>
<ul>
<li>Register / log in at <a href="https://conf.posit.co" target="_blank" rel="noopener">conf.posit.co</a></li>
<li>Go to &ldquo;Schedule&rdquo;</li>
<li>Select any session and click &ldquo;View recording&rdquo;</li>
</ul>









  





  







<div class="not-prose grid grid-cols-2 md:grid-cols-3 gap-4 mt-2 mb-6">
  
    
    
    
    

    
    
      
      
      
      
      
        
        
        
          
            
            
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
        
      
      <figure class="m-0">
        <img
          src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_6fb08991979a00f7.jpeg"
          alt="photos/photo1.jpeg"
          class="w-full aspect-[4/3] object-cover rounded-lg cursor-pointer outline-none"
          style="object-position: center"
          loading="lazy"
          
          data-gallery-group="gallery-0"
          data-gallery-src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo1.jpeg"
          data-gallery-caption=""
          
          data-gallery-webp="/blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_c111386dc651e3ed.webp 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_a70580f20689bc35.webp 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_5f3f89496c54f45.webp 1280w"
          data-gallery-jpeg="/blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_3733283b694e3e95.jpeg 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_e41a7fc1c4c722ad.jpeg 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_abfc3a8d2a5de3c.jpeg 1280w"
          role="button"
          tabindex="0"
          
        >
        
      </figure>
    
  
    
    
    
    

    
    
      
      
      
      
      
        
        
        
          
            
            
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
        
      
      <figure class="m-0">
        <img
          src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_fd39cc2dae09a981.jpeg"
          alt="photos/photo2.jpeg"
          class="w-full aspect-[4/3] object-cover rounded-lg cursor-pointer outline-none"
          style="object-position: center"
          loading="lazy"
          
          data-gallery-group="gallery-0"
          data-gallery-src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo2.jpeg"
          data-gallery-caption=""
          
          data-gallery-webp="/blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_231fb87d898db1c7.webp 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_ca84e3ba03e94d6f.webp 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_ae974601d02b8171.webp 1280w"
          data-gallery-jpeg="/blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_2037ed65cf9451e5.jpeg 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_d9de34e3c9983c0d.jpeg 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_c717be003de21464.jpeg 1280w"
          role="button"
          tabindex="0"
          
        >
        
      </figure>
    
  
    
    
    
    

    
    
      
      
      
      
      
        
        
        
          
            
            
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
        
      
      <figure class="m-0">
        <img
          src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_5cd54b096e78ab13.jpeg"
          alt="photos/photo3.jpeg"
          class="w-full aspect-[4/3] object-cover rounded-lg cursor-pointer outline-none"
          style="object-position: center"
          loading="lazy"
          
          data-gallery-group="gallery-0"
          data-gallery-src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo3.jpeg"
          data-gallery-caption=""
          
          data-gallery-webp="/blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_5851fec0224c6f18.webp 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_e500064cd3693752.webp 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_8d370cb3ea37eb67.webp 1280w"
          data-gallery-jpeg="/blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_27b827b979b5a5fb.jpeg 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_40bd6a7f550a9dde.jpeg 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_c6555aa88282daa2.jpeg 1280w"
          role="button"
          tabindex="0"
          
        >
        
      </figure>
    
  
</div>

<h2 id="announcing-the-winners-of-the-posit-impact-awards">Announcing the winners of the Posit Impact Awards
</h2>
<p>We were thrilled to launch the inaugural Posit Impact Awards to celebrate stories of measurable, meaningful change across our community. At posit::conf(2026), we were honored to announce our eight winners, each receiving a conference pass to join us in Houston!</p>
<p>A huge congratulations to all our winners, and a heartfelt thank you for the incredible work you do (and for sharing it with us)!</p>
<ul>
<li>Explore their stories in the <a href="https://posit.co/blog/2026-posit-impact-awards" target="_blank" rel="noopener">2026 Posit Impact Awards</a> blog post and join us at the <a href="https://posit.co/data-science-hangout" target="_blank" rel="noopener">Data Science Hangout</a> to hear from other Impact Award winners and nominees featured in the next few weeks.</li>
</ul>
<p><div class="not-prose"><figure>
    <img class="h-auto max-w-full rounded-lg"
      src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/images/impact-awards.jpeg"
      alt="Graphic presenting the 2026 Posit Impact Awards winners: Paulo Villarroel (Mission-Critical), Chendi Liao (Transformation), Claudio T. Rebelo (Scale &amp; Reach), Skyler Elmstrom (Resilient Impact), Jon Harmon (Community Builder), Christian Martinez (Open Source), and Amanda Perez &amp; Romina Mir (ROI &amp; Efficiency)." 
      loading="lazy"
    >
  </figure></div>
</p>
<h2 id="open-source-updates-from-positconf2026">Open Source updates from posit::conf(2026)
</h2>
<h3 id="introducing-commons">Introducing commons
</h3>
<p><a href="https://posit-dev.github.io/commons/" target="_blank" rel="noopener">commons</a> 0.1.0 introduces a new framework for building trustworthy self-service data analysis agents in R and Python. The package implements a three-tier trust labeling system that transparently indicates whether agents invoke trusted code directly, write new code justified by vetted context, or provide untrusted answers. Built on Posit’s LLM stack (<a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a>, <a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a>, <a href="https://posit-dev.github.io/shinychat/" target="_blank" rel="noopener">shinychat</a>), commons enables teams to convert existing analytical code into AI agent capabilities while maintaining transparency about code sources.</p>
<ul>
<li>Learn more about <a href="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/" target="_blank" rel="noopener">commons 0.1.0</a>.</li>
<li>Join Sara &amp; Simon&rsquo;s virtual webinar on October 28th to learn more about commons. <a href="https://events.zoom.us/ev/Ajss5j9VeRMe0zw-AtFKf7AUAsthzYhaYjYPeEIu1uYAQe1K0ud1~Agb_hSt1UGxd9fUyIDC32e6jAdEtbl7G_AaLZUYhRvyZR5cGpY5Kp_A0-w?mkt_tok=NzA5LU5YTi03MDYAAAGhT3GTQTQ5s7LDxqZGUAE1zALOLmEDysbAsOyvVdJ9P72DB_IRwtWRTED6kyJA-j-YKF7WxCTY_ZlZ4rTkiyY" target="_blank" rel="noopener">Register here</a>.</li>
</ul>
<h3 id="quarto-hub">Quarto Hub
</h3>
<p>Quarto Hub is a new hosted platform from Posit. In Quarto Hub, you can create, edit, comment on, and publish your <a href="https://quarto.org/" target="_blank" rel="noopener">Quarto projects</a> (single documents, presentations, websites) collaboratively and in real time.</p>
<ul>
<li>Watch Carlos Scheidegger&rsquo;s talk, &ldquo;Quarto Hub: Collaboratively edit, create, and share documents&rdquo;, on the event portal.</li>
</ul>
<script src="https://fast.wistia.com/player.js" async></script><script src="https://fast.wistia.com/embed/gd8zwcsex7.js" async type="module"></script><style>wistia-player[media-id='gd8zwcsex7']:not(:defined) { background: center / contain no-repeat url('https://fast.wistia.com/embed/medias/gd8zwcsex7/swatch'); display: block; filter: blur(5px); padding-top:56.25%; }</style> <wistia-player media-id="gd8zwcsex7" aspect="1.7777777777777777"></wistia-player>
<h3 id="skilift-and-skipatrol">skiLift and skiPatrol
</h3>
<p>Posit has taken over maintenance over two R packages that provide comprehensive tools to work and collaborate within Snowflake’s data platform and ML ecosystem:</p>
<ul>
<li><a href="https://github.com/posit-dev/skiLift/" target="_blank" rel="noopener">skiLift</a>: a DBI-compliant Snowflake connector written in R, that authenticates and communicates via the Snowflake SQL API (REST).</li>
<li><a href="https://github.com/posit-dev/skiPatrol/" target="_blank" rel="noopener">skiPatrol</a>: an R interface to Snowflake&rsquo;s ML platform: model registry, feature store, experiments, model monitoring, and container services.</li>
</ul>
<p>Learn more in the <a href="https://posit.co/blog/r-meet-snowflake-introducing-posits-skilift-and-skipatrol-packages" target="_blank" rel="noopener">R, meet Snowflake: Introducing Posit’s skiLift and skiPatrol Packages</a> blog post.</p>
<h2 id="even-more-open-source-updates">Even more open source updates
</h2>
<p>Beyond all the exciting conf news, September was packed with major product updates and community highlights across the board!</p>
<h3 id="at-the-database-layer">At the database layer
</h3>
<h4 id="ggsql-050-readers-writers-and-beta-status">ggsql 0.5.0: Readers, Writers, and Beta status
</h4>
<p><a href="https://ggsql.org/" target="_blank" rel="noopener">ggsql</a> is a tool that implements a grammar of graphics for SQL, enabling ggplot2-style data visualization directly from database queries. ggsql 0.5.0 reaches beta status with major improvements to database connectivity and rendering capabilities. The release introduces hybrid-reader mode for read-only connections with cache support, replaces the Vega-Lite renderer with a custom writer supporting PNG, JPEG, SVG, and PDF output, and adds rich text support through extended markdown. New features include caption support, minor breaks on scales, and true variable line aesthetics with gradients.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-24_ggsql_0_5_0/" target="_blank" rel="noopener">ggsql 0.5.0: Readers, Writers, and Beta status</a> blog post.</li>
</ul>
<h4 id="orbital-070">orbital 0.7.0
</h4>
<p><a href="https://orbital.tidymodels.org/" target="_blank" rel="noopener">orbital</a> enables the running predictions of tidymodels workflows inside databases. orbital 0.7.0 and tidypredict 1.2.0 massively expand in-database prediction capabilities for tidymodels workflows. The release adds 27 new model/engine combinations including discriminant analysis, naive Bayes, neural networks, SVMs, partial least squares, and ensemble methods. tidypredict now functions as a developer toolkit with new generics for programmatic use, and improved error messaging guides users when probability predictions aren’t available.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-09_orbital-0-7-0/" target="_blank" rel="noopener">orbital 0.7.0</a> blog post.</li>
</ul>
<h3 id="ai-powered-r-tools">AI-powered R tools
</h3>
<h4 id="ellmer-050">ellmer 0.5.0
</h4>
<p><a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a> makes it easy to use large language models (LLM) from R. ellmer 0.5.0 brings major improvements for working with large language models in R. New file handling functions reduce token costs by efficiently managing documents. The release adds citation tracking from web search tools, token counting for cost prediction, and streaming structured output support. Developer features include <code>tool_context()</code> for accessing request metadata and new lifecycle hooks for building agents.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0/" target="_blank" rel="noopener">ellmer 0.5.0</a> blog post.</li>
</ul>
<h4 id="vitals-040">vitals 0.4.0
</h4>
<p><a href="https://vitals.tidyverse.org/" target="_blank" rel="noopener">vitals</a> is a framework for large language model evaluation in R. vitals 0.4.0 brings significant performance improvements and new agent comparison capabilities for LLM evaluation in R. The release includes claude_code() and codex() helpers for benchmarking custom ellmer-built agents against leading coding agents, plus vitals_log_read() for loading log files back into resumable Chat objects. Log files are now ~4x smaller and the log viewer is substantially faster.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-03_vitals-0-4-0/" target="_blank" rel="noopener">vitals 0.4.0</a> blog post.</li>
</ul>
<h3 id="our-stuff-is-so-shiny">Our stuff is so Shiny
</h3>
<p>Check out all the major work done by the Shiny team in September!</p>
<h4 id="introducing-shinyreact-react-ui-backed-by-a-shiny-server">Introducing shinyreact: React UI backed by a Shiny server
</h4>
<p><a href="https://posit-dev.github.io/shinyreact/" target="_blank" rel="noopener">shinyreact</a> enables developers to build Shiny applications with React-based UIs while keeping Shiny’s reactive computation on the server. The package provides two primary React hooks for client-server communication, gives access to the entire npm ecosystem of React components, and includes AI Agent Skills for building and converting apps.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/" target="_blank" rel="noopener">Introducing shinyreact: React UI backed by a Shiny server </a> blog post.</li>
</ul>
<h4 id="shiny-for-python-18">Shiny for Python 1.8
</h4>
<p><a href="https://shiny.posit.co/py/" target="_blank" rel="noopener">Shiny for Python</a> 1.8 introduces in-memory server testing without browsers, enabling developers to test reactive logic with pytest using a mock connection. The release adds <code>ui.page_html()</code> for using complete HTML documents from bundlers like Vite, and <code>session.allow_reconnect()</code> to maintain live sessions after dropped websocket connections. Additional improvements include deprecation of <code>ui.output_text_verbatim()</code> in favor of clearer naming, reactive value destruction fixes, and multiple bug fixes for downloads, navsets, and data frames.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-22_shiny-python-1-8/" target="_blank" rel="noopener">Shiny for Python 1.8</a> blog post.</li>
</ul>
<h4 id="multiple-tables-saved-conversations-and-take-home-dashboards-querychat-r-040-and-python-090">Multiple tables, saved conversations, and take-home dashboards: querychat R 0.4.0 and Python 0.9.0
</h4>
<p><a href="https://posit-dev.github.io/querychat/" target="_blank" rel="noopener">querychat</a> facilitates safe and reliable natural language exploration of tabular data, powered by SQL and large language models (LLMs). querychat R 0.4.0 and Python 0.9.0 introduce multiple table support with automatic joins, persistent conversation history across sessions, and the <code>/handoff</code> command for exporting chats as downloadable Quarto dashboards, Shiny apps, or marimo notebooks. The release builds on shinychat’s full-page layout with editable messages and file attachments, adds YAML-based data dictionaries for context, and integrates with pins boards for chatting with pinned data.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/" target="_blank" rel="noopener">Multiple tables, saved conversations, and take-home dashboards: querychat R 0.4.0 and Python 0.9.0</a> blog post.</li>
</ul>
<h4 id="complete-chat-applications-in-shinychat-r-050-and-python-071">Complete chat applications in shinychat: R 0.5.0 and Python 0.7.1
</h4>
<p><a href="https://posit-dev.github.io/shinychat/" target="_blank" rel="noopener">shinychat</a> provides a Shiny toolkit for building generative AI applications like chatbots and streaming content. shinychat R 0.5.0 and Python 0.7.1 deliver complete chat application capabilities with conversation history, message editing and branching, greetings, file attachments, and slash commands. The new <code>page_chat()</code> layout provides full-window interfaces with integrated navigation, tool displays, citations, and artifact previews. Features include persistent conversation storage, search and organization tools, streaming responses with thinking panels, and toolbars for contextual actions.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/" target="_blank" rel="noopener">Complete chat applications in shinychat: R 0.5.0 and Python 0.7.1</a> blog post.</li>
</ul>
<h2 id="positconf2027-will-be-in-seattle-wa-from-sept-13-15">posit::conf(2027) will be in Seattle, WA from Sept 13-15
</h2>
<p>Save the date: We&rsquo;re heading back to the Pacific Northwest for posit::conf(2027)! <a href="https://posit.co/about/subscription-management" target="_blank" rel="noopener">Subscribe to &ldquo;Events&rdquo;</a> to get notified when registration opens.</p>
<p>In the meantime, join us for our ongoing virtual events:</p>
<ul>
<li><a href="https://pos.it/dsh" target="_blank" rel="noopener">Data Science Hangout</a> for casual conversations with leaders in the data space</li>
<li><a href="https://pos.it/dslab" target="_blank" rel="noopener">Data Science Lab</a> for live coding sessions with practitioners building cool things with code</li>
</ul>
<p>Hope to see you there!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/glimpse-conf.jpg" length="90759" type="image/jpeg" />
    </item>
    <item>
      <title>Introducing shinyreact: React UI backed by a Shiny server</title>
      <link>https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/</link>
      <pubDate>Wed, 30 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/</guid>
      <dc:creator>Barret Schloerke</dc:creator><description><![CDATA[<p>We&rsquo;re excited to introduce <a href="https://posit-dev.github.io/shinyreact/" target="_blank" rel="noopener">shinyreact</a>, a new package for R and Python. It lets you write the UI of a Shiny app in React, with any component library on npm, while reducing your Shiny server code to data-only logic.</p>
<p>shinyreact splits a Shiny app along a clean line. The Shiny server does reactive computation. The UI is a <a href="https://react.dev" target="_blank" rel="noopener">React</a> client that you own. shinyreact is the bridge between them, and it ships zero UI components of its own.</p>
<p>You can install it from CRAN or PyPI:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-1" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-1-1">R</a></li>
<li><a href="#tabset-1-2">Python</a></li>
</ul>
<div id="tabset-1-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;shinyreact&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-1-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install shinyreact</span></span></code></pre></div></div>
</div>
</div>
<p>shinyreact is new, and so is the way of building Shiny apps it proposes. We intend to keep the API small, but expect it to evolve as we learn from early adopters.</p>
<h2 id="shiny--react">Shiny + React?
</h2>
<p>For most Shiny apps, defining the UI in your app.py or app.R file allows you to construct a complete, production-ready app in just a few lines of code.</p>
<p>The trouble starts when the design asks for something Shiny and <a href="https://rstudio.github.io/bslib/" target="_blank" rel="noopener">bslib</a> don&rsquo;t have: a unique layout, richer interaction, or a component from a non-Bootstrap design system. At that point, Shiny hasn&rsquo;t had the right tool for the job.</p>
<p>React is that tool, for three reasons:</p>
<ul>
<li><strong>Ecosystem.</strong> React is the most widely used UI library on the web. Design systems, charts, tables, and maps are all one <code>npm install</code> away.</li>
<li><strong>The right model.</strong> React components are functions of state, which fits Shiny&rsquo;s reactive model naturally. When the server sends new data, the UI re-renders efficiently.</li>
<li><strong>AI assistance.</strong> LLMs have trained on an enormous amount of React code. Ask a frontier agent for a UI and it will produce better React than it will bespoke Shiny UI. This aligns with Shiny&rsquo;s goal that app developers should never be required to write low-level HTML or JavaScript themselves.</li>
</ul>
<p>Later in the post, we&rsquo;ll discuss a genomics app that renders a 584,000-cell UMAP on the GPU from a plain Shiny server. First, the basics.</p>
<h2 id="old-faithful-with-shinyreact">Old Faithful with shinyreact
</h2>
<p>Here is the classic Old Faithful histogram app as a shinyreact app:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-2" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-2-1">R</a></li>
<li><a href="#tabset-2-2">Python</a></li>
</ul>
<div id="tabset-2-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">shiny</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">shinyreact</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Set up the page UI using shinyreact</span>
</span></span><span class="line"><span class="cl"><span class="n">ui</span> <span class="o">&lt;-</span> <span class="nf">page_react</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">server</span> <span class="o">&lt;-</span> <span class="kr">function</span><span class="p">(</span><span class="n">input</span><span class="p">,</span> <span class="n">output</span><span class="p">,</span> <span class="n">session</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">x</span> <span class="o">&lt;-</span> <span class="n">faithful</span><span class="o">$</span><span class="n">waiting</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">breaks</span> <span class="o">&lt;-</span> <span class="nf">reactive</span><span class="p">({</span>
</span></span><span class="line"><span class="cl">    <span class="nf">seq</span><span class="p">(</span><span class="nf">min</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="nf">max</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="n">length.out</span> <span class="o">=</span> <span class="n">input</span><span class="o">$</span><span class="n">bin_count</span> <span class="o">+</span> <span class="m">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">})</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="c1"># Use `reactive_output()` to send data to the client</span>
</span></span><span class="line"><span class="cl">  <span class="n">output</span><span class="o">$</span><span class="n">dist_data</span> <span class="o">&lt;-</span> <span class="nf">reactive_output</span><span class="p">({</span>
</span></span><span class="line"><span class="cl">    <span class="n">bins</span> <span class="o">&lt;-</span> <span class="nf">hist</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">breaks</span> <span class="o">=</span> <span class="nf">breaks</span><span class="p">(),</span> <span class="n">plot</span> <span class="o">=</span> <span class="kc">FALSE</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nf">list</span><span class="p">(</span><span class="n">breaks</span> <span class="o">=</span> <span class="nf">I</span><span class="p">(</span><span class="n">bins</span><span class="o">$</span><span class="n">breaks</span><span class="p">),</span> <span class="n">counts</span> <span class="o">=</span> <span class="nf">I</span><span class="p">(</span><span class="n">bins</span><span class="o">$</span><span class="n">counts</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">  <span class="p">})</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">shinyApp</span><span class="p">(</span><span class="n">ui</span><span class="p">,</span> <span class="n">server</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-2-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny.express</span> <span class="kn">import</span> <span class="nb">input</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinyreact</span> <span class="kn">import</span> <span class="n">reactive_output</span><span class="p">,</span> <span class="n">set_react_page</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Set up the page UI using shinyreact</span>
</span></span><span class="line"><span class="cl"><span class="n">set_react_page</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">x</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s2">&#34;faithful.csv&#34;</span><span class="p">)[</span><span class="s2">&#34;waiting&#34;</span><span class="p">]</span><span class="o">.</span><span class="n">to_numpy</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@reactive_output</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">dist_data</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="n">breaks</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">min</span><span class="p">(),</span> <span class="n">x</span><span class="o">.</span><span class="n">max</span><span class="p">(),</span> <span class="nb">input</span><span class="o">.</span><span class="n">bin_count</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">counts</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">histogram</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">bins</span><span class="o">=</span><span class="n">breaks</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="p">{</span><span class="s2">&#34;breaks&#34;</span><span class="p">:</span> <span class="n">breaks</span><span class="o">.</span><span class="n">tolist</span><span class="p">(),</span> <span class="s2">&#34;counts&#34;</span><span class="p">:</span> <span class="n">counts</span><span class="o">.</span><span class="n">tolist</span><span class="p">()}</span></span></span></code></pre></div></div>
</div>
</div>
<p>Two things are different from a traditional Shiny app.</p>
<ol>
<li><strong>The UI is one line.</strong> <code>page_react()</code> (or <code>set_react_page()</code> in Shiny Express) serves the React client that lives in your app&rsquo;s <code>www/</code> directory. There&rsquo;s no <code>sliderInput()</code> or <code>plotOutput()</code>. The <code>www/</code> directory contains the static assets for the React app: <code>ui.js</code> and <code>ui.css</code> (when available).</li>
<li><strong>The output is data.</strong> <code>reactive_output()</code> has no matching UI function. This is a new concept for the Shiny ecosystem! <code>renderPlot()</code> sends an image for <code>plotOutput()</code> to place. <code>reactive_output()</code> sends plain JSON, here the histogram&rsquo;s <code>breaks</code> and <code>counts</code>. Like any render function, <code>reactive_output()</code> re-executes each time its reactive dependencies change. The server sends facts and React decides how to present them.</li>
</ol>
<p>Now the client:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-tsx" data-lang="tsx"><span class="line"><span class="cl"><span class="c1">// src/ui.tsx (which compiles to www/ui.js)
</span></span></span><span class="line"><span class="cl"><span class="kd">function</span> <span class="nx">App() {</span>
</span></span><span class="line"><span class="cl">  <span class="kr">const</span> <span class="p">[</span><span class="nx">binCount</span><span class="p">,</span> <span class="nx">setBinCount</span><span class="p">]</span> <span class="o">=</span> <span class="nx">useShinyInput</span><span class="p">(</span><span class="s2">&#34;bin_count&#34;</span><span class="p">,</span> <span class="mi">30</span><span class="p">);</span>
</span></span><span class="line"><span class="cl">  <span class="kr">const</span> <span class="nx">bins</span> <span class="o">=</span> <span class="nx">useShinyOutputValue</span><span class="p">(</span><span class="s2">&#34;dist_data&#34;</span><span class="p">,</span> <span class="kc">null</span><span class="p">);</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="k">return</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">main</span> <span class="na">className</span><span class="o">=</span><span class="s">&#34;layout&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">      <span class="p">&lt;</span><span class="nt">label</span> <span class="na">htmlFor</span><span class="o">=</span><span class="s">&#34;bin_count&#34;</span><span class="p">&gt;</span><span class="nb">Number</span> <span class="k">of</span> <span class="nx">bins</span><span class="o">:</span><span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">      <span class="p">&lt;</span><span class="nt">input</span>
</span></span><span class="line"><span class="cl">        <span class="na">id</span><span class="o">=</span><span class="s">&#34;bin_count&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="na">type</span><span class="o">=</span><span class="s">&#34;range&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="na">min</span><span class="o">=</span><span class="p">{</span><span class="mi">1</span><span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="na">max</span><span class="o">=</span><span class="p">{</span><span class="mi">50</span><span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="na">value</span><span class="o">=</span><span class="p">{</span><span class="nx">binCount</span><span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="na">onChange</span><span class="o">=</span><span class="p">{(</span><span class="nx">e</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="nx">setBinCount</span><span class="p">(</span><span class="nb">Number</span><span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">target</span><span class="p">.</span><span class="nx">value</span><span class="p">))}</span>
</span></span><span class="line"><span class="cl">      <span class="p">/&gt;</span>
</span></span><span class="line"><span class="cl">      <span class="p">&lt;</span><span class="nt">Histogram</span> <span class="na">bins</span><span class="o">=</span><span class="p">{</span><span class="nx">bins</span><span class="p">}</span> <span class="p">/&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;/</span><span class="nt">main</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">);</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
<figure>
<img src="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/hello-app.gif" data-fig-alt="A Shiny app with a range slider labeled Number of bins on the left and a histogram of Old Faithful waiting times on the right. As the slider moves from 30 to 8, 45, 20, and back to 30, the histogram redraws with that many bars and the caption updates to match." alt="The Old Faithful app: dragging the bin-count slider re-renders the histogram as the server sends new breaks and counts." />
<figcaption aria-hidden="true">The Old Faithful app: dragging the bin-count slider re-renders the histogram as the server sends new breaks and counts.</figcaption>
</figure>
<p>If you&rsquo;ve written React before, this is an ordinary component. <code>Histogram</code> is whatever you like: a hand-written SVG, a charting library, or a component from your design system. The only shinyreact-specific parts are two hooks:</p>
<ul>
<li><code>useShinyInput()</code> works like React&rsquo;s <code>useState()</code>, except that the value is also sent to the server as <code>input$bin_count</code> (or <code>input.bin_count()</code> in Python). Calling <code>setBinCount()</code> updates the UI and triggers the server&rsquo;s reactive graph.</li>
<li><code>useShinyOutputValue()</code> reads the value of a <code>reactive_output()</code>. When the server recomputes <code>dist_data</code>, the component re-renders with the new data.</li>
</ul>
<p>Those two hooks cover the vast majority of apps.</p>
<h2 id="ids-and-json-are-the-contract">IDs and JSON are the contract
</h2>
<p>The client and server share exactly two things: IDs and JSON values. If you write the client in TypeScript, each hook takes an optional type for its value, such as <code>useShinyInput&lt;number&gt;(&quot;bin_count&quot;, 30)</code>, and your editor will then flag a mismatch that <code>Shiny.setInputValue()</code> never could.</p>
<p>Here is the full round trip for the Old Faithful app:</p>
<ol>
<li>The client calls <code>useShinyInput(&quot;bin_count&quot;, 30)</code>, which sends <code>{&quot;bin_count&quot;: 30}</code> to the server.</li>
<li>The server reads <code>input$bin_count</code>, runs its reactive graph, and computes <code>dist_data</code> using <code>reactive_output()</code>.</li>
<li>The client receives the <code>dist_data</code> result as <code>{&quot;dist_data&quot;: {&quot;breaks&quot;: [...], &quot;counts&quot;: [...]}}</code>, and <code>useShinyOutputValue(&quot;dist_data&quot;)</code> hands it to React.</li>
</ol>
<p>That narrow boundary is what makes a shinyreact app easy to reason about. The server doesn&rsquo;t know or care how the histogram is drawn, and the client doesn&rsquo;t know how the bins are computed. Each side can be reviewed, tested, and rewritten independently, whether a person or an agent wrote it.</p>
<p>When you need more, a few other hooks are available. <code>useShinyOutputStatus()</code> tells you when an output is recalculating so you can show a skeleton, and <code>useShinyMessageHandler()</code> receives one-off messages pushed from the server with <code>send_message()</code>. See the <a href="https://posit-dev.github.io/shinyreact/js/" target="_blank" rel="noopener">JavaScript API reference</a> for the full list.</p>
<h2 id="you-dont-have-to-write-the-react-yourself">You don&rsquo;t have to write the React yourself
</h2>
<p>A fair reaction to all of this is, &ldquo;but I chose Shiny so I wouldn&rsquo;t have to write JavaScript!&rdquo;. That&rsquo;s still the goal. What&rsquo;s changed is that today&rsquo;s AI agents are very good at writing React, far better than they are at writing custom Shiny UI, because there is so much more React in the world for them to learn from.</p>
<p>With shinyreact, your job is to own the server, which is where your data and domain logic live, and to describe and review the UI. To make that concrete, both packages ship <a href="https://posit-dev.github.io/shinyreact/articles/agent-skills.html" target="_blank" rel="noopener">Agent Skills</a>:</p>
<ul>
<li><strong><code>shinyreact-build-app</code></strong> scaffolds a new shinyreact app from a description.</li>
<li><strong><code>shinyreact-convert-app</code></strong> opens an existing Shiny app in a browser, describes what it does in plain English, and then rewrites the UI in React against the same server.</li>
</ul>
<p>The day-to-day loop is familiar. You edit <code>src/ui.tsx</code> (or ask an agent to), the build step writes <code>www/ui.js</code>, and you reload the running Shiny app to see the change. The server side is unchanged: <code>runApp()</code> or <code>shiny run</code>, exactly as before.</p>
<p>Node.js isn&rsquo;t required, since a client can be a single <code>www/ui.js</code> file with no build step. However, we do strongly recommend it as it gives you a proper development environment: a build step gets you TypeScript, linting, and formatting.</p>
<h2 id="keep-what-you-already-have">Keep what you already have
</h2>
<p>shinyreact doesn&rsquo;t ask you to throw away the rest of the Shiny ecosystem.</p>
<ul>
<li><strong>Existing outputs.</strong> <code>renderPlotly()</code>, <code>render.data_frame</code>, and other render functions work as before. Drop a <code>&lt;ShinyOutput id=&quot;...&quot; /&gt;</code> into your React tree, and the output&rsquo;s JavaScript and CSS dependencies are delivered automatically.</li>
<li><strong>Modules.</strong> <code>ShinyModuleProvider</code> namespaces hook IDs to match a server-side module.</li>
<li><strong>Bookmarking.</strong> URL and server bookmarking seed the initial values of <code>useShinyInput()</code>.</li>
</ul>
<h2 id="testing-at-every-layer">Testing at every layer
</h2>
<p>Because the client and server only share IDs and JSON, each layer can be tested on its own. The server is the layer most Shiny developers care about, and it needs no browser at all. Use <code>shiny::testServer()</code> in R, or the new <code>local_server</code> pytest fixture in <a href="https://opensource.posit.co/blog/2026-09-22_shiny-python-1-8">Shiny for Python 1.8</a>: set inputs and assert on the JSON that comes out.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">test_histogram</span><span class="p">(</span><span class="n">local_server</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="n">local_server</span><span class="o">.</span><span class="n">set_inputs</span><span class="p">(</span><span class="n">bin_count</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">data</span> <span class="o">=</span> <span class="n">local_server</span><span class="o">.</span><span class="n">get_output</span><span class="p">(</span><span class="s2">&#34;dist_data&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="s2">&#34;counts&#34;</span><span class="p">])</span> <span class="o">==</span> <span class="mi">10</span></span></span></code></pre></div></div>
<p>The other layers have their own tools:</p>
<ul>
<li><strong>The client.</strong> Ordinary JavaScript unit tests, with whichever test runner you (or your agent) prefer.</li>
<li><strong>The wire.</strong> <code>wire_tap()</code> for <a href="https://rstudio.github.io/shinytest2/" target="_blank" rel="noopener">shinytest2</a> and <code>WireTap</code> for Playwright record the JSON crossing the websocket during a browser test. That gives you an end-to-end assertion on what the client actually sent and what the server actually returned, without reaching into the rendered DOM.</li>
<li><strong>The behavior.</strong> Each example app ships a <code>FEATURES.md</code>: a nested list where every leaf is one checkable claim about the app, written in plain English. A person can read it as a spec, and an agent with a browser can walk it and turn each claim into a deterministic check against the running app.</li>
</ul>
<p>The <a href="https://posit-dev.github.io/shinyreact/articles/testing.html" target="_blank" rel="noopener">testing article</a> covers all of them.</p>
<h2 id="in-the-wild-plotomics-live">In the wild: Plotomics Live
</h2>
<p>Over the summer, Shiny intern <a href="https://www.samuelbharti.com" target="_blank" rel="noopener">Samuel Bharti</a> built a <a href="https://posit-shiny-showcase-bioinformatics.share.connect.posit.cloud/" target="_blank" rel="noopener">collection of bioinformatics Shiny apps</a>. Most of them are plain Shiny and bslib. The one that reached for shinyreact did so because the visualizations demanded it.</p>
<p><a href="https://posit-plotomics-live.share.connect.posit.cloud/" target="_blank" rel="noopener">Plotomics Live</a> (<a href="https://github.com/samuelbharti/plotomics-live" target="_blank" rel="noopener">source</a>, <a href="https://doi.org/10.5281/zenodo.21936926" target="_blank" rel="noopener">DOI</a>) is a 26-page gallery of GPU-accelerated genomics visualizations, from oncoplots to a one-million-point Xenium spatial view and an interactive 584,000-cell UMAP. Large data skips JSON entirely and moves as compact binary typed arrays straight to the GPU. Because React owns the component, a new selection updates the data in place without re-mounting the visualization or reallocating GPU buffers.</p>
<p><video controls autoplay loop muted playsinline src="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/plotomics-live.mp4" class="w-full border rounded" title="Plotomics Live: one million Xenium detections rendered with WebGL, with hover tooltips and a legend of marker classes"></video></p>
<p>In Samuel&rsquo;s words:</p>
<blockquote>
<p>R stays the analysis engine, React becomes the visualization layer, and shinyreact removes the custom JavaScript bindings, manual message passing, and serialization code that used to sit between them.</p>
</blockquote>
<h2 id="whats-next">What&rsquo;s next
</h2>
<p>We&rsquo;re working on two directions next:</p>
<ul>
<li><strong>Embedding React components in existing apps</strong>, so you can adopt shinyreact one piece at a time without porting a whole app.</li>
<li><strong>Wrapping shinyreact in your own package</strong>, so you can build a component once and ship it the way bslib ships its components.</li>
</ul>
<h2 id="learn-more">Learn more
</h2>
<ul>
<li>Documentation: <a href="https://posit-dev.github.io/shinyreact/" target="_blank" rel="noopener">posit-dev.github.io/shinyreact</a></li>
<li>Source and example apps: <a href="https://github.com/posit-dev/shinyreact" target="_blank" rel="noopener">github.com/posit-dev/shinyreact</a></li>
<li>posit::conf(2026) talk slides: <a href="https://schloerke.com/presentation-2026-09-15-posit-conf-shinyreact/" target="_blank" rel="noopener">Beyond Bootstrap: Building Custom Shiny UI with React</a></li>
</ul>
<p>Give shinyreact a try, and please <a href="https://github.com/posit-dev/shinyreact/issues" target="_blank" rel="noopener">let us know</a> what you build and what breaks.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/feature.png" length="310650" type="image/png" />
    </item>
    <item>
      <title>Multiple tables, saved conversations, and take-home dashboards: querychat R 0.4.0 and Python 0.9.0</title>
      <link>https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/</link>
      <pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/</guid>
      <dc:creator>Carson Sievert</dc:creator>
      <dc:creator>Garrick Aden-Buie</dc:creator><description><![CDATA[<p>I&rsquo;m thrilled to share the latest <a href="https://posit-dev.github.io/querychat" target="_blank" rel="noopener">querychat</a> release for both R (v0.4.0) and Python (v0.9.0).
Grab the latest from CRAN or PyPI:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-1" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-1-1">R</a></li>
<li><a href="#tabset-1-2">Python</a></li>
</ul>
<div id="tabset-1-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;querychat&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-1-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install -U querychat</span></span></code></pre></div></div>
</div>
</div>
<p>This release adds several headline features, including support for multiple tables, <code>data-dict.yml</code>, a full-page chat layout, support for pins, and a new <code>/handoff</code> command.
It also builds on <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1">shinychat&rsquo;s recent momentum</a>.
As a result, querychat gets chat features like history and file attachments basically for free.
<code>querychat_app()</code> provides a quick and useful way to start chatting with data and getting bespoke <a href="https://opensource.posit.co/blog/2026-06-17_querychat-ggsql">ggsql visualizations</a>, and it now uses shinychat&rsquo;s <code>page_chat()</code> for a full chat app experience.</p>
<p>See the <a href="https://github.com/posit-dev/querychat/blob/main/pkg-r/NEWS.md" target="_blank" rel="noopener">R release notes</a> and the <a href="https://github.com/posit-dev/querychat/blob/main/pkg-py/CHANGELOG.md" target="_blank" rel="noopener">Python changelog</a> for the complete list, including <a href="#a-few-changes-for-existing-apps">a few changes for existing apps</a> if you&rsquo;re upgrading.</p>
<h2 id="full-page-chat-layout">Full-page chat layout
</h2>
<p><code>querychat_app()</code> / <code>QueryChat.app()</code> now put the chat front and center (built on shinychat&rsquo;s <code>page_chat()</code>), leaving more breathing room for things you create within the chat.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-2" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-2-1">R</a></li>
<li><a href="#tabset-2-2">Python</a></li>
</ul>
<div id="tabset-2-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">palmerpenguins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">querychat_app</span><span class="p">(</span><span class="n">penguins</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-2-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">querychat</span> <span class="kn">import</span> <span class="n">QueryChat</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">palmerpenguins</span> <span class="kn">import</span> <span class="n">load_penguins</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">=</span> <span class="n">QueryChat</span><span class="p">(</span><span class="n">load_penguins</span><span class="p">(),</span> <span class="s2">&#34;penguins&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">.</span><span class="n">app</span><span class="p">()</span></span></span></code></pre></div></div>
</div>
</div>
<script src="https://fast.wistia.com/player.js" async></script>
<script src="https://fast.wistia.com/embed/xe4aalo9yw.js" async type="module"></script>
<style>wistia-player[media-id='xe4aalo9yw']:not(:defined) { background: center / contain no-repeat url('https://fast.wistia.com/embed/medias/xe4aalo9yw/swatch'); display: block; filter: blur(5px); padding-top:75.21%; }</style>
<p><wistia-player media-id="xe4aalo9yw" aspect="1.3296296296296297"></wistia-player></p>
<p>A view of the actual data is always accessible via the data source drawer on the right-hand side.
In the case of <a href="#multiple-tables">multiple tables</a>, you&rsquo;ll see the active table<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>, as well as other available tables below it.</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/multi-table.png" alt="A view of QueryChat.app() with the data source drawer opened." class="shadow rounded" />
<p>The new <code>page()</code> method brings this same full-page chat layout to your own apps.
Your users get the chat front and center, and you can still add custom views on other <code>pages</code>, in the <code>drawer</code>, or in the <code>sidebar</code>.</p>
<p>Learn more about <a href="https://posit-dev.github.io/querychat/r/articles/build.html" target="_blank" rel="noopener">building custom apps in R</a> and <a href="https://posit-dev.github.io/querychat/py/build.html" target="_blank" rel="noopener">Python</a>.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-3" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-3-1">R</a></li>
<li><a href="#tabset-3-2">Python</a></li>
</ul>
<div id="tabset-3-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">&lt;-</span> <span class="n">QueryChat</span><span class="o">$</span><span class="nf">new</span><span class="p">(</span><span class="n">penguins</span><span class="p">,</span> <span class="s">&#34;penguins&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">ui</span> <span class="o">&lt;-</span> <span class="n">qc</span><span class="o">$</span><span class="nf">page</span><span class="p">(</span><span class="s">&#34;Penguins Explorer&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-3-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">querychat.express</span> <span class="kn">import</span> <span class="n">QueryChat</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">palmerpenguins</span> <span class="kn">import</span> <span class="n">load_penguins</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">=</span> <span class="n">QueryChat</span><span class="p">(</span><span class="n">load_penguins</span><span class="p">(),</span> <span class="s2">&#34;penguins&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">.</span><span class="n">page</span><span class="p">(</span><span class="s2">&#34;Penguins Explorer&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
</div>
<h2 id="conversation-history">Conversation history
</h2>
<p>Another major improvement is persistent conversation history (<a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#return-to-earlier-conversations">mostly thanks to shinychat</a>).
In addition to starting new chats and returning to previous ones, conversations now persist across page reloads and timeouts.
As a result, it is now much more difficult to lose your progress.</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/history.png" alt="A view of QueryChat.app() with the history sidebar opened." class="shadow rounded" />
<p>Also, now that shinychat supports <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#edit-a-message-and-compare-answers">editable messages</a>, <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#stream-responses-and-show-thinking">canceling responses</a>, <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#attach-files">file attachments</a>, and more, querychat does too.</p>
<h2 id="multiple-tables">Multiple tables
</h2>
<p>querychat now supports multiple tables in a single chat instance.
If those tables reside in a singular source, like a database, you can add them all in one fell swoop with the <code>add_tables()</code> method.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-4" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-4-1">R</a></li>
<li><a href="#tabset-4-2">Python</a></li>
</ul>
<div id="tabset-4-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">querychat</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">&lt;-</span> <span class="n">QueryChat</span><span class="o">$</span><span class="nf">new</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">$</span><span class="nf">add_tables</span><span class="p">(</span><span class="n">db</span><span class="p">,</span> <span class="nf">c</span><span class="p">(</span><span class="s">&#34;customers&#34;</span><span class="p">,</span> <span class="s">&#34;orders&#34;</span><span class="p">,</span> <span class="s">&#34;order_items&#34;</span><span class="p">))</span></span></span></code></pre></div></div>
</div>
<div id="tabset-4-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">querychat</span> <span class="kn">import</span> <span class="n">QueryChat</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">=</span> <span class="n">QueryChat</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">.</span><span class="n">add_tables</span><span class="p">(</span><span class="n">db</span><span class="p">,</span> <span class="p">[</span><span class="s2">&#34;customers&#34;</span><span class="p">,</span> <span class="s2">&#34;orders&#34;</span><span class="p">,</span> <span class="s2">&#34;order_items&#34;</span><span class="p">])</span></span></span></code></pre></div></div>
</div>
</div>
<p>querychat&rsquo;s query and visualization tools handle joins across these tables, so a single question can span all of them.
To write a query like the one below, the LLM first needs to know what&rsquo;s in each table: column names, types, and value ranges.
So it starts by fetching the schema of each table it needs (&ldquo;Fetch schemas&rdquo;), then generates the query with that metadata in mind.</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/cross-join.png" alt="A chat asking for average order value by acquisition channel. The LLM fetches schemas for the customers, orders, and order_items tables, then runs a SQL query that joins all three." class="shadow rounded" />
<p>In a custom app, the new <code>table()</code> method gives your server code reactive access to any table, including whatever filters the LLM has applied to it.
That means you can keep building your own plots and views in Shiny, and your users can drive them just by chatting.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-5" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-5-1">R</a></li>
<li><a href="#tabset-5-2">Python</a></li>
</ul>
<div id="tabset-5-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">output</span><span class="o">$</span><span class="n">order_price</span> <span class="o">&lt;-</span> <span class="nf">renderPlot</span><span class="p">({</span>
</span></span><span class="line"><span class="cl">  <span class="n">orders_tbl</span> <span class="o">&lt;-</span> <span class="n">qc</span><span class="o">$</span><span class="nf">table</span><span class="p">(</span><span class="s">&#34;orders&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="c1"># LLM can perform filter queries on $df()</span>
</span></span><span class="line"><span class="cl">  <span class="n">orders_df</span> <span class="o">&lt;-</span> <span class="n">orders_tbl</span><span class="o">$</span><span class="nf">df</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="nf">hist</span><span class="p">(</span><span class="n">orders_df</span><span class="o">$</span><span class="n">price</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">})</span></span></span></code></pre></div></div>
</div>
<div id="tabset-5-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="nd">@render.plot</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">_</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">  <span class="n">orders_tbl</span> <span class="o">=</span> <span class="n">qc</span><span class="o">.</span><span class="n">table</span><span class="p">(</span><span class="s2">&#34;orders&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="c1"># LLM can perform filter queries on .df()</span>
</span></span><span class="line"><span class="cl">  <span class="n">orders_df</span> <span class="o">=</span> <span class="n">orders_tbl</span><span class="o">.</span><span class="n">df</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="n">plt</span><span class="o">.</span><span class="n">hist</span><span class="p">(</span><span class="n">orders_df</span><span class="p">[</span><span class="s2">&#34;price&#34;</span><span class="p">])</span></span></span></code></pre></div></div>
</div>
</div>
<h2 id="provide-context-data-dict">Provide context: <code>data-dict</code>
</h2>
<p>querychat does its best to gather context from the data itself.
When the LLM fetches a table&rsquo;s schema, it gets whatever metadata querychat can compute from the data.
That&rsquo;s a good start, but in practice it often isn&rsquo;t enough.
Column names can be cryptic, coded values need decoding, and nothing in the data says what &ldquo;active customer&rdquo; means to your business or how tables relate.
In the <a href="#multiple-tables">example above</a>, the LLM had to infer from column names alone that <code>orders.customer_id</code> points to <code>customers.id</code>.</p>
<p>A <strong>data dictionary</strong> is how you fill in what the data can&rsquo;t say about itself.
It&rsquo;s a YAML file that follows the <a href="https://data-dict.tidyverse.org/" target="_blank" rel="noopener">data-dict</a> spec.
Alongside plain-English descriptions, it has its own fields for column types, allowed values, keys, and the relationships between tables.
This is now the preferred way to describe your data:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">tables</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">customers</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">One row per customer.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">columns</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">acquisition_channel</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">enum</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">values</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">organic, paid_search, social, referral]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">How the customer first found us.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">orders</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">One row per order.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">columns</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">customer_id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">number(id)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">constraints</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">foreign_key]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">order_items</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">One row per item in an order.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">columns</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">price</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">number(quantity)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">Item price in USD.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">relationships</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">Each order belongs to one customer.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">cardinality</span><span class="p">:</span><span class="w"> </span><span class="l">many-to-one</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">join</span><span class="p">:</span><span class="w"> </span><span class="l">orders.customer_id = customers.id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">Each order has one or more items.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">cardinality</span><span class="p">:</span><span class="w"> </span><span class="l">many-to-one</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">join</span><span class="p">:</span><span class="w"> </span><span class="l">order_items.order_id = orders.id</span></span></span></code></pre></div></div>
<p>Pass it in as <code>data_dict = &quot;dictionary.yml&quot;</code> (R) / <code>data_dict=&quot;dictionary.yml&quot;</code> (Python).
When the LLM fetches a table&rsquo;s schema, any column you&rsquo;ve documented comes straight from your dictionary, with nothing left to infer.
querychat only computes metadata from the data for the columns your dictionary doesn&rsquo;t cover.</p>
<h2 id="extract-insights-handoff">Extract insights: <code>/handoff</code>
</h2>
<p>Over the course of a conversation, querychat tends to produce a pile of results, some more useful than others.
The useful ones deserve to live on in a reproducible artifact that doesn&rsquo;t depend on the chat app.</p>
<p>That&rsquo;s the idea behind the new <strong><code>/handoff</code></strong> slash command.
It&rsquo;s available in every querychat app, with no setup required.
When a user types <code>/handoff</code> into the chat input, a wizard opens where they select the results that matter, choose an output format (e.g., Quarto, marimo, Shiny, Jupyter), and add any presentation instructions for the LLM to follow when it generates the handoff document.</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/handoff-wizard.png" alt="The handoff wizard" class="shadow rounded" />
<p>When the user finishes the wizard, the handoff document&rsquo;s source code streams into a code editor, where they can revise it by hand or with AI assistance.
A download button then gives them a zip bundle with the handoff document, a README file, and the data sources (if they&rsquo;re small enough).</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/handoff-download.png" alt="The handoff editor" class="shadow rounded" />
<h2 id="chat-with-pinned-data">Chat with pinned data
</h2>
<p>querychat can now chat with data pinned to a <a href="https://pins.rstudio.com/" target="_blank" rel="noopener">pins</a> board.
Pass the board and the pin name, and querychat reads the pin (parquet, CSV, JSON, RDS, and more) and uses its title, description, and tags as the starting data description:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-6" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-6-1">R</a></li>
<li><a href="#tabset-6-2">Python</a></li>
</ul>
<div id="tabset-6-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">pins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">querychat</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">board</span> <span class="o">&lt;-</span> <span class="nf">board_connect</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">querychat_app</span><span class="p">(</span><span class="n">board</span><span class="p">,</span> <span class="s">&#34;my_pin&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-6-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install <span class="s2">&#34;querychat[pins]&#34;</span></span></span></code></pre></div></div>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pins</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">querychat</span> <span class="kn">import</span> <span class="n">QueryChat</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">board</span> <span class="o">=</span> <span class="n">pins</span><span class="o">.</span><span class="n">board_connect</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">=</span> <span class="n">QueryChat</span><span class="p">(</span><span class="n">board</span><span class="p">,</span> <span class="s2">&#34;my_pin&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">.</span><span class="n">app</span><span class="p">()</span></span></span></code></pre></div></div>
</div>
</div>
<p>For more control, such as setting the table name used in SQL, use the new <code>PinSource</code> class directly.
Multiple pins, or pins mixed with ordinary data frames, also work together in one chat.
Everything is materialized into a shared DuckDB connection behind the scenes, so the LLM can join and filter across all of it.
See the <a href="https://posit-dev.github.io/querychat/r/articles/data-sources.html" target="_blank" rel="noopener">data sources guide for R</a> and <a href="https://posit-dev.github.io/querychat/py/data-sources.html" target="_blank" rel="noopener">Python</a> for details.</p>
<h2 id="a-few-changes-for-existing-apps">A few changes for existing apps
</h2>
<p>This release also includes a handful of breaking changes, mostly around how querychat manages connections and bookmarking now that history is built in.
If you&rsquo;re upgrading, skim the <a href="https://github.com/posit-dev/querychat/blob/main/pkg-r/NEWS.md" target="_blank" rel="noopener">R NEWS</a> or <a href="https://github.com/posit-dev/querychat/blob/main/pkg-py/CHANGELOG.md" target="_blank" rel="noopener">Python CHANGELOG</a> breaking-changes sections before you do.</p>
<h2 id="learn-more">Learn more
</h2>
<ul>
<li><a href="https://posit-dev.github.io/querychat/py/" target="_blank" rel="noopener">querychat documentation</a> (<a href="https://posit-dev.github.io/querychat/r/" target="_blank" rel="noopener">R</a>) &mdash; full guides on data sources, context, tools, and deployment</li>
<li><a href="https://data-dict.tidyverse.org/" target="_blank" rel="noopener">data-dict</a> &mdash; the data dictionary spec querychat now reads</li>
<li><a href="https://ggsql.org" target="_blank" rel="noopener">ggsql</a> &mdash; the grammar of graphics for SQL that powers querychat&rsquo;s visualizations</li>
<li><a href="https://posit-dev.github.io/shinychat/py/" target="_blank" rel="noopener">shinychat</a> (<a href="https://posit-dev.github.io/shinychat/r/" target="_blank" rel="noopener">R</a>) &mdash; the chat UI toolkit querychat builds on</li>
<li><a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a> (<a href="https://ellmer.tidyverse.org" target="_blank" rel="noopener">ellmer</a>) &mdash; the underlying LLM tool-calling libraries</li>
<li><a href="https://github.com/posit-dev/querychat" target="_blank" rel="noopener">Source on GitHub</a> &mdash; issues, discussions, and contributions welcome</li>
</ul>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>We thank everyone who contributed to these releases, for opening issues, submitting pull requests, and providing feedback:
<a href="https://github.com/gadenbuie" target="_blank" rel="noopener">@gadenbuie</a>,
<a href="https://github.com/hadley" target="_blank" rel="noopener">@hadley</a>,
<a href="https://github.com/iainwallacebms" target="_blank" rel="noopener">@iainwallacebms</a>,
<a href="https://github.com/iamYannC" target="_blank" rel="noopener">@iamYannC</a>,
<a href="https://github.com/jnhyeon" target="_blank" rel="noopener">@jnhyeon</a>,
<a href="https://github.com/kolabearafk" target="_blank" rel="noopener">@kolabearafk</a>, and
<a href="https://github.com/thisisnic" target="_blank" rel="noopener">@thisisnic</a>.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>By default, the active table is the first one supplied.
However, if the LLM is prompted to show a filtered/sorted view of a table, then that table becomes active (and the drawer will automatically open).&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/featured.png" length="227292" type="image/png" />
    </item>
    <item>
      <title>Shiny for Python 1.8</title>
      <link>https://opensource.posit.co/blog/2026-09-22_shiny-python-1-8/</link>
      <pubDate>Tue, 22 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-22_shiny-python-1-8/</guid>
      <dc:creator>Barret Schloerke</dc:creator><description><![CDATA[<p>We&rsquo;re happy to announce that <a href="https://pypi.org/project/shiny/" target="_blank" rel="noopener">Shiny for Python v1.8</a> is now on PyPI!</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install -U shiny</span></span></code></pre></div></div>
<p>The highlights:
* <a href="#in-memory-server-testing"><code>test_server()</code></a> runs your app&rsquo;s server logic in memory so you can test it without a browser,
* <a href="#bring-your-own-html-document"><code>ui.page_html()</code></a> lets a complete HTML document (say, the <code>index.html</code> your JS bundler emits) be the app&rsquo;s UI, and
* <a href="#session-reconnection"><code>session.allow_reconnect()</code></a> lets the browser reconnect to a live session after a dropped connection.</p>
<p>Full details are in the <a href="https://github.com/posit-dev/py-shiny/blob/main/CHANGELOG.md" target="_blank" rel="noopener">Shiny for Python changelog</a>.</p>
<h2 id="in-memory-server-testing">In-memory server testing
</h2>
<p>Until now, testing a Shiny for Python app meant one of two things: unit-test the pure functions your server calls, or spin up the app and a browser with Playwright and test end to end. There was nothing in between for the part that actually makes an app a Shiny app: the reactive graph.</p>
<p>New in v1.8, <a href="https://shiny.posit.co/py/api/testing/testserver.test_server.html" target="_blank" rel="noopener"><code>shiny.testserver.test_server()</code></a> runs a server function, Express app, or <code>shiny.App</code> against a mock connection. There&rsquo;s no browser and no network server, and your test stays a plain synchronous function: <code>test_server()</code> drives the event loop for you, so you never write <code>async def</code> or <code>await</code>. (If your test already runs inside an event loop, use <code>test_server_async()</code> instead.) Set inputs, let the reactive graph settle, and assert on outputs, all in an ordinary <a href="https://docs.pytest.org/" target="_blank" rel="noopener">pytest</a> test. It&rsquo;s the Python counterpart to Shiny for R&rsquo;s <a href="https://shiny.posit.co/r/reference/shiny/latest/testServer.html" target="_blank" rel="noopener"><code>testServer()</code></a>.</p>
<p>For the common case, an <code>app.py</code> next to your test file, the new <code>local_server</code> pytest fixture is the whole setup:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">test_doubling_app</span><span class="p">(</span><span class="n">local_server</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="n">local_server</span><span class="o">.</span><span class="n">set_inputs</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s2">&#34;Ada&#34;</span><span class="p">,</span> <span class="n">n</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="n">local_server</span><span class="o">.</span><span class="n">is_ok</span>
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="n">local_server</span><span class="o">.</span><span class="n">get_output</span><span class="p">(</span><span class="s2">&#34;greeting&#34;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&#34;Hello, Ada!&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="n">local_server</span><span class="o">.</span><span class="n">get_output</span><span class="p">(</span><span class="s2">&#34;doubled&#34;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&#34;20&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    <span class="c1"># Inputs you don&#39;t name keep their values, so `name` is still &#34;Ada&#34;.</span>
</span></span><span class="line"><span class="cl">    <span class="n">local_server</span><span class="o">.</span><span class="n">set_inputs</span><span class="p">(</span><span class="n">n</span><span class="o">=</span><span class="mi">21</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="n">local_server</span><span class="o">.</span><span class="n">get_output</span><span class="p">(</span><span class="s2">&#34;doubled&#34;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&#34;42&#34;</span></span></span></code></pre></div></div>
<p><code>local_server</code> is the in-memory sibling of the existing <code>local_app</code> fixture, but function-scoped: a session remembers the inputs set so far, so each test gets a fresh one.</p>
<p>Each output also reports how it turned out, which is what to reach for when the assertion isn&rsquo;t about equality:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">test_reports_a_bad_value</span><span class="p">(</span><span class="n">local_server</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="n">local_server</span><span class="o">.</span><span class="n">set_inputs</span><span class="p">(</span><span class="n">n</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="n">local_server</span><span class="o">.</span><span class="n">is_ok</span> <span class="ow">is</span> <span class="kc">False</span>
</span></span><span class="line"><span class="cl">    <span class="n">failed</span> <span class="o">=</span> <span class="n">local_server</span><span class="o">.</span><span class="n">get_output</span><span class="p">(</span><span class="s2">&#34;doubled&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="n">failed</span><span class="o">.</span><span class="n">status</span> <span class="o">==</span> <span class="s2">&#34;error&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="s2">&#34;must be positive&#34;</span> <span class="ow">in</span> <span class="n">failed</span><span class="o">.</span><span class="n">error</span></span></span></code></pre></div></div>
<p>Modules work too. Reach into one with its namespaced id (<code>&quot;counter-n&quot;</code>), or take a scope and use the bare ids the module&rsquo;s own code uses:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">test_counter_module</span><span class="p">(</span><span class="n">local_server</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="n">counter</span> <span class="o">=</span> <span class="n">local_server</span><span class="o">.</span><span class="n">make_scope</span><span class="p">(</span><span class="s2">&#34;counter&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">counter</span><span class="o">.</span><span class="n">set_inputs</span><span class="p">(</span><span class="n">n</span><span class="o">=</span><span class="mi">7</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="n">counter</span><span class="o">.</span><span class="n">get_output</span><span class="p">(</span><span class="s2">&#34;label&#34;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&#34;n=7&#34;</span></span></span></code></pre></div></div>
<p>And when you need something other than <code>app.py</code>, call <code>test_server()</code> directly as a context manager. It accepts a path, a <code>shiny.App</code>, or a bare server function (handy for testing a module&rsquo;s server function on its own):</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny.testserver</span> <span class="kn">import</span> <span class="n">test_server</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">test_the_other_app</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="k">with</span> <span class="n">test_server</span><span class="p">(</span><span class="s2">&#34;other_app.py&#34;</span><span class="p">)</span> <span class="k">as</span> <span class="n">ts</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">        <span class="n">ts</span><span class="o">.</span><span class="n">set_inputs</span><span class="p">(</span><span class="n">n</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="k">assert</span> <span class="n">ts</span><span class="o">.</span><span class="n">get_output</span><span class="p">(</span><span class="s2">&#34;tripled&#34;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&#34;30&#34;</span></span></span></code></pre></div></div>
<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">What about plots and client data?</span>
</div>
<div class="callout-body">
<p>A real browser reports things like output sizes and the page URL back to the server, and <code>@render.plot</code> needs a width and height before it can draw. <code>test_server()</code> sends sensible stand-ins for all of these as soon as the session starts, so plots render out of the box. Override the default client data with <code>client_data=</code>, or change one output&rsquo;s size mid-test with <code>set_inputs()</code>.</p>
</div>
</div>
<p>The bundled <code>shiny-for-python</code> <a href="https://opensource.posit.co/blog/2026-08-04_shiny-r-1-14-python-1-7#agent-skills">Agent Skill</a> has a new <code>test-server</code> topic as well, so coding agents reach for in-memory server tests instead of hand-built sessions or a browser when only server logic needs checking.</p>
<p>New to testing Shiny apps? Start with <a href="https://shiny.posit.co/py/docs/unit-testing.html" target="_blank" rel="noopener">Unit testing</a> and <a href="https://shiny.posit.co/py/docs/end-to-end-testing.html" target="_blank" rel="noopener">End-to-end testing</a> on the Shiny for Python website, then browse the <a href="https://shiny.posit.co/py/api/testing/index.html" target="_blank" rel="noopener">testing API reference</a>.</p>
<h2 id="bring-your-own-html-document">Bring your own HTML document
</h2>
<p>Shiny&rsquo;s <code>ui.page_*()</code> functions build the HTML document for you. That&rsquo;s usually what you want, but sometimes you already have one: the <code>index.html</code> a JS bundler like Vite emits, a hand-written template, or a page produced by another tool entirely.</p>
<p><a href="https://shiny.posit.co/py/api/core/ui.page_html.html" target="_blank" rel="noopener"><code>ui.page_html()</code></a> takes that document, as a string or a <code>Path</code>, and serves it as-is. Shiny&rsquo;s own HTML dependencies (plus any you pass via <code>extra_deps=</code>) are inserted where you put a placeholder <code>&lt;meta&gt;</code> tag, and their files are served by the app:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="cp">&lt;!doctype html&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">html</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;</span><span class="nt">head</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">name</span><span class="o">=</span><span class="s">&#34;shiny-dependency-placeholder&#34;</span> <span class="na">content</span><span class="o">=</span><span class="s">&#34;&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">script</span> <span class="na">type</span><span class="o">=</span><span class="s">&#34;module&#34;</span> <span class="na">src</span><span class="o">=</span><span class="s">&#34;/assets/index.js&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">script</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;/</span><span class="nt">head</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;</span><span class="nt">body</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">div</span> <span class="na">id</span><span class="o">=</span><span class="s">&#34;app&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;/</span><span class="nt">body</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">html</span><span class="p">&gt;</span></span></span></code></pre></div></div>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny</span> <span class="kn">import</span> <span class="n">App</span><span class="p">,</span> <span class="n">ui</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">app_dir</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="vm">__file__</span><span class="p">)</span><span class="o">.</span><span class="n">parent</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">server</span><span class="p">(</span><span class="nb">input</span><span class="p">,</span> <span class="n">output</span><span class="p">,</span> <span class="n">session</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="o">...</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">app</span> <span class="o">=</span> <span class="n">App</span><span class="p">(</span><span class="n">ui</span><span class="o">.</span><span class="n">page_html</span><span class="p">(</span><span class="n">app_dir</span> <span class="o">/</span> <span class="s2">&#34;index.html&#34;</span><span class="p">),</span> <span class="n">server</span><span class="p">)</span></span></span></code></pre></div></div>
<p>If your document marks the spot differently, set <code>deps_replace_pattern=</code>. And because <code>ui.page_html()</code> returns a regular UI object, you can return it from a UI function (<code>App(ui=lambda request: ...)</code>), which is what bookmarking requires.</p>
<p>In Express, pass the document to <a href="https://shiny.posit.co/py/api/express/express.ui.page_opts.html" target="_blank" rel="noopener"><code>ui.page_opts(html=)</code></a>. The whole app is routed through <code>ui.page_html()</code>: top-level UI markup is dropped, since the document already <em>is</em> the page, but any HTML dependencies it brings along are kept.</p>
<p>This is the Python counterpart to Shiny for R&rsquo;s <code>shinyApp(ui = htmlTemplate(&quot;index.html&quot;, document_ = TRUE))</code> with <code>attachDependencies()</code>.</p>
<h2 id="session-reconnection">Session reconnection
</h2>
<p>When the websocket between the browser and the server drops, Shiny shows the &ldquo;Disconnected from server&rdquo; overlay and the client gives up. If your hosting environment keeps sessions alive after a client disconnects (Posit Connect and Shiny Server both can), that&rsquo;s a missed opportunity: the session is still right there.</p>
<p><a href="https://shiny.posit.co/py/api/core/Session.html#shiny.Session.allow_reconnect" target="_blank" rel="noopener"><code>session.allow_reconnect(True)</code></a> tells the client to instead show a countdown dialog and try to reconnect. On success, the browser sends its current input values back to the server, and the server recalculates outputs and sends them down again. Users pick up right where they left off after a flaky Wi-Fi blip or a laptop lid closing.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny</span> <span class="kn">import</span> <span class="n">App</span><span class="p">,</span> <span class="n">ui</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">server</span><span class="p">(</span><span class="nb">input</span><span class="p">,</span> <span class="n">output</span><span class="p">,</span> <span class="n">session</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="n">session</span><span class="o">.</span><span class="n">allow_reconnect</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="o">...</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">app</span> <span class="o">=</span> <span class="n">App</span><span class="p">(</span><span class="n">ui</span><span class="o">.</span><span class="n">page_fluid</span><span class="p">(</span><span class="o">...</span><span class="p">),</span> <span class="n">server</span><span class="p">)</span></span></span></code></pre></div></div>
<p>Pass <code>&quot;force&quot;</code> to attempt the reconnect anywhere, which is useful for exercising the countdown UI on a local <code>shiny run</code> server (where the attempt starts a fresh session rather than resuming the old one). This is the Python counterpart to Shiny for R&rsquo;s <a href="https://shiny.posit.co/r/reference/shiny/latest/session.html" target="_blank" rel="noopener"><code>session$allowReconnect()</code></a>.</p>
<h2 id="deprecation-uioutput_text_verbatim">Deprecation: <code>ui.output_text_verbatim()</code>
</h2>
<p><code>ui.output_text_verbatim()</code> now emits a <code>ShinyDeprecationWarning</code>. It has long been a leftover from Shiny for R&rsquo;s <code>verbatimTextOutput()</code>, and Python has had clearer names for both jobs for a while:</p>
<ul>
<li>For code or other monospaced text, use <code>ui.output_code()</code> with <code>@render.code</code>.</li>
<li>For plain text, use <code>ui.output_text()</code> with <code>@render.text</code>.</li>
</ul>
<p>The matching Playwright controller, <code>playwright.controller.OutputTextVerbatim</code>, is deprecated alongside it; use <code>playwright.controller.OutputCode</code> instead.</p>
<h2 id="other-improvements">Other improvements
</h2>
<p>A few more changes worth a quick mention. The full list is in the <a href="https://github.com/posit-dev/py-shiny/blob/main/CHANGELOG.md" target="_blank" rel="noopener">changelog</a>:</p>
<ul>
<li>Closing a session no longer destroys the reactive values and calcs created in it. Since v1.6.1, refreshing the page while an <code>@reactive.extended_task</code> was in flight could raise <code>DestroyedReactiveError</code> once it settled. Values and calcs are now left readable at their last value and reclaimed by garbage collection; effects are still destroyed on close.</li>
<li><code>ui.input_slider()</code> and <code>ui.update_slider()</code> now encode <code>datetime.date</code> values as UTC midnight, matching Shiny for R, so they no longer shift by a day when the server runs in a timezone ahead of UTC. Naive <code>datetime.datetime</code> values round-trip unchanged too.</li>
<li><code>@render.download_button</code> and <code>@render.download_link</code> now honor <code>@output(id=)</code>. Previously the URL and the registered handler disagreed on the id, so clicking the control returned a 404.</li>
<li><code>@expressify</code> and <code>@render.express</code> no longer fail with <code>RuntimeError: Failed to find function '...' in AST</code> when another decorator has changed the function&rsquo;s <code>__name__</code>, a pattern often used to give each <code>@render.express</code> function in a loop a unique output id.</li>
<li>Navsets created with an <code>id</code> now use it as their <code>data-tabsetid</code>, so tab panes get stable DOM ids instead of ones built from a random integer. This makes the markup reproducible and easier to target from custom CSS and JavaScript. (Thanks, <a href="https://github.com/pevolution-ahmed" target="_blank" rel="noopener">@pevolution-ahmed</a>!)</li>
<li><code>ui.show_offcanvas()</code> now accepts the <code>id</code> of an <code>ui.offcanvas()</code> panel already in the UI, matching <code>ui.hide_offcanvas()</code> and <code>ui.toggle_offcanvas()</code>. It also accepts bare tag content, wrapping it in a new anonymous panel.</li>
<li><code>@render.data_frame</code> now renders data frames whose column names are empty or not strings; column ids are positional and never derived from the name.</li>
<li><code>@render.ui</code> outputs inside a <code>ui.popover()</code> or <code>ui.tooltip()</code> without a <code>title=</code> no longer get stuck showing &ldquo;recalculating&rdquo;.</li>
<li><code>shiny run --app-dir &lt;dir&gt; &lt;app&gt;</code> now honors <code>--app-dir</code> for Shiny Express apps.</li>
<li><code>ui.input_task_button(type=None)</code> no longer drops the class its input binding needs, so the button is bound and clicking it works.</li>
<li><code>playwright.controller.Offcanvas</code> gains <code>open()</code>, <code>loc_trigger</code>, <code>loc_title</code>, <code>loc_footer</code>, and <code>expect_title()</code>, <code>expect_footer()</code>, and <code>expect_placement()</code>.</li>
<li><code>playwright.controller.InputSelectize</code> no longer clicks the page body to close its dropdown, so a test can&rsquo;t accidentally fire the app&rsquo;s own click handlers.</li>
</ul>
<h2 id="in-closing">In closing
</h2>
<p>We&rsquo;re excited to see what you build (and test) with this release. As always, if you have questions or feedback, <a href="https://discord.gg/yMGCamUMnS" target="_blank" rel="noopener">join us on Discord</a> or open an issue on <a href="https://github.com/posit-dev/py-shiny/issues/new" target="_blank" rel="noopener">posit-dev/py-shiny</a>. Happy Shiny-ing!</p>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>A big thank you to all the folks who helped make this release happen by opening issues and contributing code:</p>
<p><a href="https://github.com/ambevill" target="_blank" rel="noopener">@ambevill</a>, <a href="https://github.com/arabidopsis" target="_blank" rel="noopener">@arabidopsis</a>, <a href="https://github.com/bealdav" target="_blank" rel="noopener">@bealdav</a>, <a href="https://github.com/chernojagne" target="_blank" rel="noopener">@chernojagne</a>, <a href="https://github.com/ChidiebereNjoku" target="_blank" rel="noopener">@ChidiebereNjoku</a>, <a href="https://github.com/cpsievert" target="_blank" rel="noopener">@cpsievert</a>, <a href="https://github.com/danieldebondt-tf" target="_blank" rel="noopener">@danieldebondt-tf</a>, <a href="https://github.com/drewe7192" target="_blank" rel="noopener">@drewe7192</a>, <a href="https://github.com/eeshsaxena" target="_blank" rel="noopener">@eeshsaxena</a>, <a href="https://github.com/ErdaradunGaztea" target="_blank" rel="noopener">@ErdaradunGaztea</a>, <a href="https://github.com/FBruzzesi" target="_blank" rel="noopener">@FBruzzesi</a>, <a href="https://github.com/gadenbuie" target="_blank" rel="noopener">@gadenbuie</a>, <a href="https://github.com/jat255" target="_blank" rel="noopener">@jat255</a>, <a href="https://github.com/jubilee2" target="_blank" rel="noopener">@jubilee2</a>, <a href="https://github.com/karangattu" target="_blank" rel="noopener">@karangattu</a>, <a href="https://github.com/kramerrs" target="_blank" rel="noopener">@kramerrs</a>, <a href="https://github.com/MichielNoback" target="_blank" rel="noopener">@MichielNoback</a>, <a href="https://github.com/mykolaskrynnyk" target="_blank" rel="noopener">@mykolaskrynnyk</a>, <a href="https://github.com/nightcityblade" target="_blank" rel="noopener">@nightcityblade</a>, <a href="https://github.com/nvelden" target="_blank" rel="noopener">@nvelden</a>, <a href="https://github.com/pevolution-ahmed" target="_blank" rel="noopener">@pevolution-ahmed</a>, <a href="https://github.com/schloerke" target="_blank" rel="noopener">@schloerke</a>, <a href="https://github.com/shawnboltz" target="_blank" rel="noopener">@shawnboltz</a>, <a href="https://github.com/tjpalanca" target="_blank" rel="noopener">@tjpalanca</a>, <a href="https://github.com/weichisyu" target="_blank" rel="noopener">@weichisyu</a>, and <a href="https://github.com/xiruizhao" target="_blank" rel="noopener">@xiruizhao</a>.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-22_shiny-python-1-8/feature.gif" length="127580" type="image/gif" />
    </item>
    <item>
      <title>AI Newsletter: New releases from ellmer, shinychat, and commons</title>
      <link>https://opensource.posit.co/blog/2026-09-18_ai-newsletter/</link>
      <pubDate>Fri, 18 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-18_ai-newsletter/</guid>
      <dc:creator>Sara Altman</dc:creator>
      <dc:creator>Simon Couch</dc:creator><description><![CDATA[<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title"><strong>Subscribe to the AI Newsletter!</strong></span>
</div>
<div class="callout-body">
<p>The AI newsletter is published as an RSS feed. Follow it in your favorite reader:</p>
<p><a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener noreferrer" class="btn-shortcode inline-flex mb-5 mr-5 items-center px-4 py-3 text-sm leading-5 gap-2 rounded-lg bg-blue-400 !text-white font-semibold align-middle hover:bg-blue-500 transition no-underline">Subscribe via RSS</a></p>
<p><strong>Want the newsletter as an email?</strong> Paste the feed URL, <a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener">https://opensource.posit.co/tags/ai-newsletter/index.xml</a>, into a free RSS-to-email service such as <a href="https://blogtrottr.com/" target="_blank" rel="noopener">Blogtrottr</a>, <a href="https://feedrabbit.com/" target="_blank" rel="noopener">Feedrabbit</a>, or <a href="https://follow.it/" target="_blank" rel="noopener">Follow.it</a>, and each new issue will arrive in your inbox.</p>
</div>
</div>
<p>Last week, three packages in Posit&rsquo;s open-source AI stack shipped significant releases. We introduced commons 0.1.0, and ellmer and shinychat both received substantial updates. These releases are part of a broader effort to make it as easy as possible to build modern chat applications in R and Python.</p>
<p>In this newsletter, we&rsquo;ll take a quick tour of what&rsquo;s new.</p>
<h2 id="introducing-commons">Introducing commons
</h2>
<p><strong>commons, a new framework for building trustworthy self-service data analysis agents in R and Python, is now on CRAN.</strong> Read the full announcement <a href="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0">here</a>.</p>
<p>The Python package is currently in a pre-release beta stage, with more features arriving over the next few weeks.</p>
<p>If you&rsquo;re a data analyst, data scientist, statistical programmer, or other data practitioner, you likely have extensive domain knowledge and a collection of <em>trusted code</em> that you already use in analyses, apps, reports, and packages. The core idea behind commons is that we can leverage this trusted code to improve an agent&rsquo;s correctness.</p>
<p>A commons agent first searches for a trusted calculation. If it finds one that can answer the user&rsquo;s question, it can run that vetted code and the answer is deterministically marked as verified.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/commons-01-traffic-trend.gif" title="A commons agent answering a question with a trusted calculation." data-fig-alt="A commons agent answers how site traffic is trending by finding and running a trusted calculation. The resulting chart and answer are marked as verified." />
<p>If it doesn&rsquo;t find a trusted calculation, the agent searches trusted context before writing custom R, Python, or SQL. The answer is either given a citation or marked as &ldquo;untrusted,&rdquo; depending on whether the agent provides a verified citation that supports its approach.</p>
<p>The model doesn&rsquo;t decide how trustworthy its answer is. commons assigns each label deterministically based on the analysis path taken by the agent.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/trust-flow.svg" class="column-page" data-fig-alt="Flow diagram showing how commons routes questions. It first searches trusted calculations. If it finds one, it runs the calculation and returns a verified answer. Otherwise, it searches trusted context, writes custom code, and returns either a cited or lower-trust answer." />
<p>commons also ships with an agent skill to help you create a commons agent and functions for analyzing your users&rsquo; conversations.</p>
<h2 id="shinychat-v050-r-and-v071-python">shinychat v0.5.0 (R) and v0.7.1 (Python)
</h2>
<p><strong>shinychat v0.5.0 for R and v0.7.1 for Python bring together more of what you need to build a complete chat application.</strong> Several of these shinychat updates also made commons possible!</p>
<p>Read the full blog post <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1">here</a>. There are many more updates worth checking out.</p>
<h3 id="page_chat"><code>page_chat()</code>
</h3>
<p>Use <code>page_chat()</code> instead of the bslib <code>page_*()</code> functions when you want the chat to be the center of your application. <code>page_chat()</code> creates a full-window, chatbot-oriented layout with support for navigation pages, conversation history, an <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#artifact-drawer">artifact drawer</a>, and more.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/shinychat-page-chat.png" title="A shinychat app built `page_chat()`." class="column-page" data-fig-alt="A full-window Site traffic assistant built with page_chat, showing a traffic-trend question, a compact calculation activity row, the assistant&#39;s answer, and the chat input." />
<h3 id="conversation-history">Conversation history
</h3>
<p>Conversation history is enabled by default when you use <code>chat_server()</code> in R or <code>Chat(client=...)</code> in Python, allowing users to start a new conversation, switch between saved conversations, search them, rename them, and delete them.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/shinychat-history.png" title="Previous conversations shown in the chat history sidebar." class="column-page" data-fig-alt="The Site traffic assistant with its history sidebar open, showing controls to search or start a conversation and three saved traffic-analysis conversations beside the active chat." />
<h3 id="readable-tool-calls-and-citations">Readable tool calls and citations
</h3>
<p>This shinychat release also includes several improvements for understanding how a model arrived at its response.</p>
<p>One such improvement is readable tool calls. By default, related tool calls are grouped into compact, single-line &ldquo;activity rows&rdquo;, keeping them from overwhelming the conversation. You can still inspect the individual tool calls by expanding a row.</p>
<p>shinychat also displays citations returned by providers&rsquo; built-in web-search and web-fetch tools.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/shinychat-tools-citations.png" title="A grouped activity row and an open citation." data-fig-alt="A Shinychat answer with a compact grouped activity row for searching documentation and querying the warehouse, plus an open citation identifying sessions_daily as the canonical site-traffic source." />
<h2 id="ellmer-050">ellmer 0.5.0
</h2>
<p><strong><a href="https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0">ellmer 0.5.0</a> is now on CRAN.</strong> ellmer makes it easy to work with LLMs from R.</p>
<p>Read the full announcement <a href="https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0">here</a>. Many of the features made available in this release are also available in recent releases of <a href="https://github.com/posit-dev/chatlas/releases" target="_blank" rel="noopener">chatlas</a>, ellmer&rsquo;s sibling package in Python.</p>
<h3 id="citations">Citations
</h3>
<p>When a model uses a supported built-in web tool, ellmer now returns and displays the provider-supplied citations. This works with <code>claude_tool_web_search()</code>, <code>claude_tool_web_fetch()</code>, <code>google_tool_web_search()</code>, and <code>openai_tool_web_search()</code>, helping you identify the sources behind the model&rsquo;s answer.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_openai</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">register_tool</span><span class="p">(</span><span class="nf">openai_tool_web_search</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">chat</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;What is the most recent version of ellmer on CRAN? Look it up.&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; The most recent CRAN release of **ellmer** is **version 0.5.0**, published</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; **September 4, 2026**.</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ([cran.r-project.org](https://cran.r-project.org/package%3Dellmer))[1]</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Sources</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] CRAN: Package ellmer: https://cran.r-project.org/package%3Dellmer</span></span></span></code></pre></div></div>
<h3 id="tokens-and-costs">Tokens and costs
</h3>
<p>Managing tokens and costs is an important part of working with LLMs.</p>
<p>Ever want to know how many tokens an input will take before sending it? For supported providers, you can now use <code>chat$token_count()</code> to estimate input token use. Instead of actually sending the request to the model, it sends the request to the provider&rsquo;s token-counting API.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_openai</span><span class="p">(</span><span class="n">model</span> <span class="o">=</span> <span class="s">&#34;gpt-5.6-luna&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">prompt</span> <span class="o">&lt;-</span> <span class="nf">content_pdf_file</span><span class="p">(</span><span class="s">&#34;example-document.pdf&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">token_count</span><span class="p">(</span><span class="n">prompt</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] 252</span></span></span></code></pre></div></div>
<p>This estimates only the tokens used by the input and does not predict the number of output tokens, so it won&rsquo;t represent the total round-trip count.</p>
<p>Companies frequently release new models and change their prices. Use the new function <code>models_update_prices()</code> to download and cache the latest pricing data from the ellmer GitHub repo. Cost estimates reported by <code>token_usage()</code>, <code>Chat$get_cost()</code>, <code>Chat$get_tokens()</code>, and printed <code>Chat</code> objects use this data.</p>
<h3 id="send-files-to-the-model">Send files to the model
</h3>
<p>It&rsquo;s often useful to send files as part of a chat. You can now send CSV, Markdown, code, and other text-based files to a model with <code>content_document_file()</code> and <code>content_document_url()</code>. For large files or files reused across multiple turns, if you&rsquo;re using <code>chat_openai()</code>, <code>chat_anthropic()</code>, or <code>chat_google_gemini()</code>, use <code>chat$file_upload()</code> instead. It uploads the file once and returns a reference for <code>$chat()</code>. This avoids repeatedly sending the file and reduces token usage and cost.</p>
<h2 id="solid-improvements-for-custom-agents">Solid improvements for custom agents
</h2>
<p>Taken together, these releases make it easier to build more complete custom agents. ellmer manages model interactions in R, shinychat provides the user-facing chat interface, and commons adds a framework for data analysis agents that builds upon these two.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/hero.png" length="543199" type="image/png" />
    </item>
    <item>
      <title>Introducing commons</title>
      <link>https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/</link>
      <pubDate>Tue, 15 Sep 2026 13:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/</guid>
      <dc:creator>Simon Couch</dc:creator>
      <dc:creator>Sara Altman</dc:creator>
      <dc:creator>Josh Taillon</dc:creator><description><![CDATA[<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title"><strong>Learn more about commons at our Posit Monthly Workflow Demo</strong></span>
</div>
<div class="callout-body">
<p>Join Sara and Simon on October 28th at 11:00 AM CT to explore Posit Commons!</p>
<p><a href="https://events.zoom.us/ev/Ajss5j9VeRMe0zw-AtFKf7AUAsthzYhaYjYPeEIu1uYAQe1K0ud1~Agb_hSt1UGxd9fUyIDC32e6jAdEtbl7G_AaLZUYhRvyZR5cGpY5Kp_A0-w" target="_blank" rel="noopener">Register here</a>.</p>
</div>
</div>
<p>We&rsquo;re hootin&rsquo; and hollerin&rsquo; to share <a href="https://posit-dev.github.io/commons/" target="_blank" rel="noopener">commons</a>, an R and Python package that helps data scientists build trustworthy data analysis agents.</p>
<video class="column-page" autoplay loop muted playsinline controls preload="metadata" aria-label="Screen recording of a commons agent answering 'How is traffic trending for our site?' by running a trusted calculation and displaying a chart showing daily site visits increased 22%.">
  <source src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/commons-01-traffic-trend.mp4" type="video/mp4">
  Your browser does not support embedded videos.
</video>
<p>The package is built on <a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a>, <a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a>, and <a href="https://github.com/posit-dev/shinychat/" target="_blank" rel="noopener">shinychat</a>, Posit&rsquo;s open source LLM stack. You can use whatever model you want from any of the providers supported by those packages with it.</p>
<p>To install the R package, run:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;commons&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p>To install the Python package from PyPI, run:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-py" data-lang="py"><span class="line"><span class="cl"><span class="n">pip</span> <span class="n">install</span> <span class="n">commons</span></span></span></code></pre></div></div>
<p>The Python package is currently in a pre-release beta stage, but you can install and play around with it today, with more features arriving over the next few weeks.</p>
<h2 id="design-philosophy">Design philosophy
</h2>
<p>AI agents for data analysis can range from overly cautious and narrowly correct to wildly and confidently incorrect. commons provides a framework for you to design more trustworthy analysis agents by providing them with access to existing <strong>trusted code</strong>, while still allowing them enough flexibility to answer novel, realistic questions.</p>
<p>If you are a data analyst, data scientist, statistical programmer, or other data practitioner, you likely have a deep understanding of your problem domain and a collection of trusted code you depend on for your analyses and use to create apps, reports, and packages. The core idea behind commons is that we can improve an agent&rsquo;s correctness by giving it the right access and documentation to run this code that you have already vetted.</p>
<style>
.commons-inline-icon {
  display: inline-block;
  height: 1.25em;
  margin: 0 0.08em;
  vertical-align: -0.25em;
  width: 1.25em;
}
</style>
<p>When answering questions, commons agents first search through a pool of trusted code. If the agent finds an appropriate piece of trusted code, it can invoke it directly, and its response will be tagged with a green shield icon <img src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/trusted-icon.svg" class="commons-inline-icon" alt="">. If it doesn&rsquo;t, it will search through relevant context before writing its own SQL, R, or Python. If the agent can find trusted context that justifies its approach, it can provide a citation <img src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/citation-mark.svg" class="commons-inline-icon" alt=""> to it at the end of its answer, which will be deterministically checked by commons. Otherwise, the answer is marked with a small warning label <img src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/warning-icon.svg" class="commons-inline-icon" alt="">.</p>
<img src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/trust-flow.svg" class="column-page" alt="Flow diagram. A commons agent searches trusted calculations. If it finds a relevant calculation, it runs the trusted calculation and returns a verified answer. Otherwise, it searches context, writes SQL or R, and returns either a cited or untrusted answer.">
<p>Notably, the agent itself does not decide how to label a response. commons instead labels answers deterministically, based on the path the agent takes to get it to its answer.</p>
<h2 id="get-started">Get started
</h2>
<p>To get started with the R package, check out the <a href="https://posit-dev.github.io/commons/r/articles/commons.html" target="_blank" rel="noopener">introductory vignette</a>. The package ships with an <a href="https://posit-dev.github.io/commons/r/articles/commons.html#working-with-the-agent-skill" target="_blank" rel="noopener">agent skill</a> to help you hook your trusted code and context up to the agent.</p>
<p>The Python package (although still in beta) is based on the same ideas, and the resulting apps will look <em>very</em> similar regardless of whether you use R or Python—they literally share the same CSS! Check out the <a href="https://posit-dev.github.io/commons/py/" target="_blank" rel="noopener">Python package site</a> to learn more.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/commons.png" length="1439234" type="image/png" />
    </item>
    <item>
      <title>Complete chat applications in shinychat: R 0.5.0 and Python 0.7.1</title>
      <link>https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/</link>
      <pubDate>Tue, 15 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/</guid>
      <dc:creator>Garrick Aden-Buie</dc:creator>
      <dc:creator>Carson Sievert</dc:creator><description><![CDATA[<p>We&rsquo;re excited to announce <a href="https://posit-dev.github.io/shinychat/r/" target="_blank" rel="noopener">shinychat v0.5.0 for R</a> and <a href="https://posit-dev.github.io/shinychat/py/" target="_blank" rel="noopener">shinychat v0.7.1 for Python</a>.
This release brings the pieces of a complete chat application together around the conversation itself.</p>
<p>shinychat is a toolkit for building complete, conversation-centered chat applications with Shiny.
The R package pairs with <a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a>, and the Python package pairs with <a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a>.
Install the latest releases from CRAN or PyPI:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-1" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-1-1">R</a></li>
<li><a href="#tabset-1-2">Python</a></li>
</ul>
<div id="tabset-1-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;shinychat&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-1-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install -U shinychat</span></span></code></pre></div></div>
</div>
</div>
<p>We cover a lot in this post, and there&rsquo;s even more in the releases.
See the <a href="https://github.com/posit-dev/shinychat/blob/main/pkg-r/NEWS.md" target="_blank" rel="noopener">R release notes</a> and the <a href="https://github.com/posit-dev/shinychat/blob/main/pkg-py/CHANGELOG.md" target="_blank" rel="noopener">Python changelog</a> for the complete list of changes, including <a href="#a-few-changes-for-existing-apps">a few changes for existing apps</a> if you&rsquo;re upgrading.</p>
<h2 id="build-a-chat-application">Build a chat application
</h2>
<div class="w-full aspect-4/3">
      <video
        src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/complete-app.mp4"
        class="w-full h-full object-contain"
        title="A complete chat application: the history sidebar lists saved conversations, the assistant answers with a tool activity row and citations, and the artifact drawer opens beside the chat with a plot"
        controls></video>
    </div>
<p>A useful chat application needs more than a text box and a streaming response.
Your users need a way to return to an earlier conversation, start a new one, correct a question, compare answers, inspect sources, and see what the model is doing when it calls a tool.
They may also need to upload a file, open a preview, or move between the chat and the rest of the application.</p>
<p>shinychat gives you sensible starting points for building that experience.
Pair it with <a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a> in R or <a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a> in Python, and you can get a working chat app running with little setup.
The chat application model has three layers:</p>
<ol>
<li><code>page_chat()</code> gives you a full-window chat app with space for navigation, history, tools, and supporting content.</li>
<li><code>chat_ui()</code> lets you place chat wherever it fits best in your application.</li>
<li><code>chat_server()</code> for R or <code>Chat(client=...)</code> for Python connects your app to an <code>ellmer</code> or <code>chatlas</code> client and enables the integrated chat features.</li>
</ol>
<p>When you want a fully custom experience or need a model client other than ellmer or chatlas, the lower-level pieces are still available for you to assemble yourself.</p>
<h2 id="start-with-page_chat">Start with <code>page_chat()</code>
</h2>
<p>When chat is the center of your application, use <code>page_chat()</code>.
It gives your users a full-window experience with a <a href="#create-a-chat-app">chat home</a>, <a href="#complete-application">navigation pages</a>, <a href="#complete-application">sidebars</a>, <a href="#toolbars">toolbars</a>, <a href="#return-to-earlier-conversations">conversation history</a>, and an <a href="#artifact-drawer">artifact drawer</a>.
Users can move to a settings or sources page while their conversation keeps working and streaming.
The <a href="https://posit-dev.github.io/shinychat/r/articles/get-started.html" target="_blank" rel="noopener">Get started</a> guide for R and the <a href="https://posit-dev.github.io/shinychat/py/page-chat.html" target="_blank" rel="noopener">Page chat</a> guide for Python walk through the full layout.</p>
<h3 id="create-a-chat-app">Create a chat app
</h3>
<p>Build a shinychat application starts similarly in both languages:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-2" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-2-1">R</a></li>
<li><a href="#tabset-2-2">Python</a></li>
</ul>
<div id="tabset-2-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">shiny</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">shinychat</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">ui</span> <span class="o">&lt;-</span> <span class="nf">page_chat</span><span class="p">(</span><span class="n">title</span> <span class="o">=</span> <span class="s">&#34;Assistant&#34;</span><span class="p">,</span> <span class="n">id</span> <span class="o">=</span> <span class="s">&#34;chat&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">server</span> <span class="o">&lt;-</span> <span class="kr">function</span><span class="p">(</span><span class="n">input</span><span class="p">,</span> <span class="n">output</span><span class="p">,</span> <span class="n">session</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">client</span> <span class="o">&lt;-</span> <span class="n">ellmer</span><span class="o">::</span><span class="nf">chat_openai</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">system_prompt</span> <span class="o">=</span> <span class="s">&#34;You are a helpful assistant.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="nf">chat_server</span><span class="p">(</span><span class="s">&#34;chat&#34;</span><span class="p">,</span> <span class="n">client</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">shinyApp</span><span class="p">(</span><span class="n">ui</span><span class="p">,</span> <span class="n">server</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-2-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">chatlas</span> <span class="kn">import</span> <span class="n">ChatAnthropic</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat.express</span> <span class="kn">import</span> <span class="n">Chat</span><span class="p">,</span> <span class="n">page_chat</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">client</span> <span class="o">=</span> <span class="n">ChatAnthropic</span><span class="p">(</span><span class="n">system_prompt</span><span class="o">=</span><span class="s2">&#34;You are a helpful assistant.&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">=</span> <span class="n">Chat</span><span class="p">(</span><span class="nb">id</span><span class="o">=</span><span class="s2">&#34;chat&#34;</span><span class="p">,</span> <span class="n">client</span><span class="o">=</span><span class="n">client</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">page_chat</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Assistant&#34;</span><span class="p">,</span> <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;chat&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
</div>
<p>With just a few lines of code, you&rsquo;ll have a working chat app backed by a live LLM.
Passing a client to <code>chat_server()</code> in R, or to <code>Chat()</code> in Python, does all the hard work for you, fulling connecting your app to the model client and giving you a complete multi-user chat application<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>.</p>
<p>For a personal chat UI you can use while you develop locally, pass an ellmer client to <a href="https://posit-dev.github.io/shinychat/r/reference/chat_app.html" target="_blank" rel="noopener"><code>chat_app()</code></a> in R, or a chatlas client to <a href="https://posit-dev.github.io/shinychat/py/api/Chat.html" target="_blank" rel="noopener"><code>Chat(client=...)</code></a>, and then call <code>.app()</code> in Python.</p>
<h3 id="welcome-users">Welcome users
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/greeting-suggestions-greeting.png" data-fig-alt="A new chat with a short welcome message and a grid of three suggestion cards beneath it." />
<p>When you&rsquo;re app opens, don&rsquo;t leave your users hanging with an empty chat canvas, gree them with <code>chat_greeting()</code> (<a href="https://posit-dev.github.io/shinychat/r/reference/chat_greeting.html" target="_blank" rel="noopener">R</a>, <a href="https://posit-dev.github.io/shinychat/py/api/chat_greeting.html" target="_blank" rel="noopener">Python</a>)!</p>
<p>Greetings can be used to explain the application, set expectations, and give users a useful first step before they write their first message.
By default, they disappear when the user starts chatting, but you can set <code>persistent = TRUE</code> in R or <code>persistent=True</code> in Python to keep one at the top of the conversation history.</p>
<p>Greetings are written in markdown and can even provide actionable suggestions.
Users can click a suggestion to fill the input, ready to edit before sending, or send it immediately.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><span class="line"><span class="cl"><span class="gu">## Welcome!
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">What would you like to do?
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">*</span> &lt;span class=&#34;suggestion submit&#34;&gt;Summarize my data&lt;/span&gt;
</span></span><span class="line"><span class="cl"><span class="k">*</span> &lt;span class=&#34;suggestion&#34;&gt;Create a plot&lt;/span&gt;
</span></span><span class="line"><span class="cl">* &lt;span class=&#34;suggestion&#34;&gt;Explain this code&lt;/span&gt;</span></span></code></pre></div></div>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/greeting-suggestions-fill-input.png" data-fig-alt="Clicking a suggestion card fills the chat input with the suggested prompt, ready to edit before sending." />
<p>You don&rsquo;t have to greet your users with the same message every time, you can use LLMs to generate fresh custom greetings.
To learn more, we&rsquo;ll point you to the <code>chat_greeting()</code> documentation pages (<a href="https://posit-dev.github.io/shinychat/r/reference/chat_greeting.html" target="_blank" rel="noopener">R</a>, <a href="https://posit-dev.github.io/shinychat/py/api/chat_greeting.html" target="_blank" rel="noopener">Python</a>), but it&rsquo;s worth noting that dynamic greetings can stream into the chat like any other response.</p>
<div class="w-full aspect-4/3">
      <video
        src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/greeting-stream.mp4"
        class="w-full h-full object-contain"
        title="A generated greeting streams into the empty chat: the welcome message arrives word by word, then two suggestion cards appear"
        controls></video>
    </div>
<h2 id="return-to-earlier-conversations">Return to earlier conversations
</h2>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/history-list.png" data-fig-alt="The conversation history drawer open beside the chat, listing several named conversations under Today with a search field and a New conversation button." />
<p>One of the biggest features to arrive in this release is conversation history, giving your chat app the ability to save and return to previous conversations.
It will also persist the current conversation across page reloads and other disconnects, virtually eliminating the possibility of losing your progress.
As usual, when you connect shinychat with an ellmer or chatlas client, conversation history is wired up and enabled for you!</p>
<h3 id="save-conversations">Save conversations
</h3>
<p>The history drawer lets users:</p>
<ul>
<li>Start a new conversation.</li>
<li>Switch between saved conversations.</li>
<li>Search conversations.</li>
<li>Rename a conversation.</li>
<li>Delete a conversation.</li>
<li>Return to the conversation that was active when they last opened the app.</li>
</ul>
<p>shinychat generates a short title once the conversation has enough content.
Users can replace that title, and title generation never overwrites a manual rename.</p>
<div class="panel-tabset">
<ul id="tabset-3" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-3-1">Rename</a></li>
<li><a href="#tabset-3-2">Search</a></li>
</ul>
<div id="tabset-3-1">
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/history-actions-menu.png" data-fig-alt="The menu on a saved conversation with options to rename and delete it." />
</div>
<div id="tabset-3-2">
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/history-search.png" data-fig-alt="Typing in the history drawer search field narrows the conversation list to matching titles." />
</div>
</div>
<p>You can <code>history_options()</code> in R or <code>HistoryOptions</code> in Python to configure the conversations that shinychat saves.
The main options are:</p>
<ul>
<li><code>restore_mode</code>, which controls which conversation opens when a user returns to the app:
<ul>
<li><code>&quot;browser&quot;</code> is the default. It returns that browser to its most recent conversation without changing the URL.</li>
<li><code>&quot;url&quot;</code> puts the active conversation ID in the address bar, so users can bookmark or share a specific conversation.</li>
<li><code>&quot;bookmark&quot;</code> restores the conversation with the rest of the app state when your app uses Shiny server bookmarking.</li>
</ul>
</li>
<li><code>store</code> controls where shinychat saves conversations. Use <code>&quot;memory&quot;</code> for local development or tests, or <code>&quot;file&quot;</code> to save them on disk.</li>
<li><code>title</code> controls how the automated conversation titles are generated.</li>
</ul>
<p>For example, this configuration stores conversations on disk and puts the active conversation ID in the URL:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-4" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-4-1">R</a></li>
<li><a href="#tabset-4-2">Python</a></li>
</ul>
<div id="tabset-4-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">history</span> <span class="o">&lt;-</span> <span class="nf">history_options</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="n">restore_mode</span> <span class="o">=</span> <span class="s">&#34;url&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="n">store</span> <span class="o">=</span> <span class="s">&#34;file&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">chat_server</span><span class="p">(</span><span class="s">&#34;chat&#34;</span><span class="p">,</span> <span class="n">client</span><span class="p">,</span> <span class="n">history</span> <span class="o">=</span> <span class="n">history</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-4-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat</span> <span class="kn">import</span> <span class="n">Chat</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat.types</span> <span class="kn">import</span> <span class="n">HistoryOptions</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">history</span> <span class="o">=</span> <span class="n">HistoryOptions</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">restore_mode</span><span class="o">=</span><span class="s2">&#34;url&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">store</span><span class="o">=</span><span class="s2">&#34;file&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">=</span> <span class="n">Chat</span><span class="p">(</span><span class="s2">&#34;chat&#34;</span><span class="p">,</span> <span class="n">client</span><span class="o">=</span><span class="n">client</span><span class="p">,</span> <span class="n">history</span><span class="o">=</span><span class="n">history</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
</div>
<p>On Posit Connect, conversation history is included with the platform and is enabled automatically when you provide a model client.
The default configuration uses Connect&rsquo;s <a href="https://docs.posit.co/connect/user/structuring-content/#persistent-storage-on-posit-connect" target="_blank" rel="noopener">persistent storage</a> and scopes conversations to the authenticated user.
That gives every user a private conversation history without an additional history service or per-user setup.</p>
<p>In every restore mode, shinychat keeps the transcript in its configured store instead of putting the full conversation in the URL.</p>
<h3 id="edit-a-message-and-compare-answers">Edit a message and compare answers
</h3>
<div class="w-full aspect-4/3">
      <video
        src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/edit-branches-edit.mp4"
        class="w-full h-full object-contain"
        title="Editing an earlier message and resending it starts a new branch, and the sibling navigation control appears on the response"
        controls></video>
    </div>
<p>Editing a message now creates a new conversation <strong>branch</strong>.
When a user edits and resends an earlier message, shinychat forks the conversation at that point: the original question and its later messages remain on one branch, while the edited question begins another. Users can move between the answers with the branch controls in the message.</p>
<div class="panel-tabset">
<ul id="tabset-5" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-5-1">Branch 1</a></li>
<li><a href="#tabset-5-2">Branch 2</a></li>
</ul>
<div id="tabset-5-1">
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/edit-branches-original.png" data-fig-alt="The original conversation with an assistant response showing a 1 / 2 sibling navigation control." />
</div>
<div id="tabset-5-2">
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/edit-branches-new.png" data-fig-alt="The same conversation after editing a message, with the new branch&#39;s response selected and the sibling navigation control showing 2 / 2." />
</div>
</div>
<p>Branches help when a prompt is almost right or when a model takes an unhelpful direction, and they make comparing answers easy without starting over.
And they are part of the saved conversation, so users return to their place in the conversation after a reload.</p>
<h2 id="add-content-and-controls">Add content and controls
</h2>
<p>When chat is part of a larger application, your users still need access to filters, settings, sources, and results.
<code>page_chat()</code> gives you a place to put those alongside the conversation: a drawer for results, toolbars for controls, and offcanvas panels for settings you would rather keep off screen.</p>
<h3 id="artifact-drawer">Artifact drawer
</h3>
<p><code>chat_drawer()</code> gives you a place to show previews, rendered reports, tables, plots, or other bits of Shiny UI next to your chat.
Your users can keep the conversation visible while they inspect a result.</p>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/complete-app-nav-drawer.png" data-fig-alt="The research assistant app with the Research assistant and Sources navigation pages in the header, the conversation in the main region, and the artifact drawer open beside the chat showing a bar chart of penguin counts." />
<p>See the <a href="https://posit-dev.github.io/shinychat/r/reference/chat_drawer.html" target="_blank" rel="noopener">drawer documentation for R</a> or <a href="https://posit-dev.github.io/shinychat/py/api/chat_drawer.html" target="_blank" rel="noopener">Python</a> for the full API.
The <a href="#complete-application">complete application example</a> combines a drawer with the rest of the application layout.</p>
<h3 id="toolbars">Toolbars
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/toolbars-home.png" data-fig-alt="A close-up of a research assistant chat. Part of the conversation is visible beside the global toolbar&#39;s Refresh, Help, and Answer settings buttons, with a response style selector below the chat input." />
<p>Your app may need a Help button that works on every page, while the chat home needs an action that&rsquo;s only relevant when you&rsquo;re looking at the conversation. <code>page_chat()</code> gives each action a home through scoped <a href="https://opensource.posit.co/blog/2026-05-26_introducing-toolbars">toolbars</a>, built on the toolbar components that bslib and Shiny shipped earlier this year.</p>
<p>If you want an action to follow users through the whole app &mdash; pass it to <code>toolbar_global</code>. Put chat-home actions in <code>toolbar</code> in <code>page_chat()</code>, and give a <a href="#complete-application">secondary page</a> its own <code>toolbar</code> through <code>chat_nav_panel()</code>. <code>toolbar_input</code> puts related actions below the message box.</p>
<p>See the <a href="https://posit-dev.github.io/shinychat/r/articles/get-started.html" target="_blank" rel="noopener">R get started guide</a> or the <a href="https://posit-dev.github.io/shinychat/py/page-chat.html" target="_blank" rel="noopener">Python Page chat guide</a> for the full toolbar API.</p>
<h3 id="offcanvas-panels">Offcanvas panels
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/toolbars-offcanvas.png" data-fig-alt="The research assistant app with the Answer settings offcanvas open along the right edge, showing a target length slider and a citations checkbox beside the conversation." />
<p><code>page_chat()</code> pairs <a href="https://opensource.posit.co/blog/2026-08-04_shiny-r-1-14-python-1-7">offcanvas panels</a> with secondary content, such as an answer-length slider or citation setting, and a toolbar button can open an <strong>Answer settings</strong> panel from any page:</p>
<h3 id="complete-application">Complete application
</h3>
<p>As your app grows, <code>page_chat()</code> can grow around the conversation. You can add secondary pages and a sidebar for filters or other app UI and the application menu keeps those options available on narrow screens.</p>
<p>The following example brings the toolbars, sidebar, navigation, and drawer together.</p>
<details class="callout callout-tip" role="note" aria-label="Tip">
<summary class="callout-header">
<span class="callout-title">A complete <code>page_chat()</code> example</span>
</summary>
<div class="callout-body">
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-6" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-6-1">R</a></li>
<li><a href="#tabset-6-2">Python</a></li>
</ul>
<div id="tabset-6-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">ui</span> <span class="o">&lt;-</span> <span class="nf">page_chat</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Research assistant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="n">id</span> <span class="o">=</span> <span class="s">&#34;chat&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="n">toolbar</span> <span class="o">=</span> <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;clear_chat&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;Clear conversation&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="n">icon</span> <span class="o">=</span> <span class="n">bsicons</span><span class="o">::</span><span class="nf">bs_icon</span><span class="p">(</span><span class="s">&#34;arrow-counterclockwise&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">toolbar_global</span> <span class="o">=</span> <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;help&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;Help&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="n">icon</span> <span class="o">=</span> <span class="n">bsicons</span><span class="o">::</span><span class="nf">bs_icon</span><span class="p">(</span><span class="s">&#34;question-circle&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">sidebar</span> <span class="o">=</span> <span class="nf">chat_sidebar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">tags</span><span class="o">$</span><span class="nf">p</span><span class="p">(</span><span class="s">&#34;Use filters to focus the results.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">history</span> <span class="o">=</span> <span class="kc">FALSE</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">pages_navbar</span> <span class="o">=</span> <span class="nf">list</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="nf">chat_nav_panel</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;Sources&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="n">tags</span><span class="o">$</span><span class="nf">p</span><span class="p">(</span><span class="s">&#34;Sources selected during this session appear here.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">      <span class="n">toolbar</span> <span class="o">=</span> <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">          <span class="s">&#34;refresh_sources&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">          <span class="s">&#34;Refresh&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">          <span class="n">icon</span> <span class="o">=</span> <span class="n">bsicons</span><span class="o">::</span><span class="nf">bs_icon</span><span class="p">(</span><span class="s">&#34;arrow-repeat&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">drawer</span> <span class="o">=</span> <span class="nf">chat_drawer</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">tags</span><span class="o">$</span><span class="nf">p</span><span class="p">(</span><span class="s">&#34;Select a result to inspect it here.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">title</span> <span class="o">=</span> <span class="s">&#34;Latest result&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">open</span> <span class="o">=</span> <span class="kc">FALSE</span>
</span></span><span class="line"><span class="cl">  <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-6-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">faicons</span> <span class="kn">import</span> <span class="n">icon_svg</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny</span> <span class="kn">import</span> <span class="n">ui</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat</span> <span class="kn">import</span> <span class="n">chat_drawer</span><span class="p">,</span> <span class="n">chat_nav_panel</span><span class="p">,</span> <span class="n">chat_sidebar</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat.express</span> <span class="kn">import</span> <span class="n">page_chat</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">page_chat</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="s2">&#34;Research assistant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;chat&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">toolbar</span><span class="o">=</span><span class="n">ui</span><span class="o">.</span><span class="n">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;clear_chat&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">label</span><span class="o">=</span><span class="s2">&#34;Clear conversation&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">icon</span><span class="o">=</span><span class="n">icon_svg</span><span class="p">(</span><span class="s2">&#34;arrow-counterclockwise&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">toolbar_global</span><span class="o">=</span><span class="n">ui</span><span class="o">.</span><span class="n">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;help&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">label</span><span class="o">=</span><span class="s2">&#34;Help&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">icon</span><span class="o">=</span><span class="n">icon_svg</span><span class="p">(</span><span class="s2">&#34;question-circle&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">sidebar</span><span class="o">=</span><span class="n">chat_sidebar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">p</span><span class="p">(</span><span class="s2">&#34;Use filters to focus the results.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="n">history</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">pages_navbar</span><span class="o">=</span><span class="p">[</span>
</span></span><span class="line"><span class="cl">        <span class="n">chat_nav_panel</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;Sources&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">ui</span><span class="o">.</span><span class="n">p</span><span class="p">(</span><span class="s2">&#34;Sources selected during this session appear here.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">            <span class="n">toolbar</span><span class="o">=</span><span class="n">ui</span><span class="o">.</span><span class="n">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">                <span class="n">ui</span><span class="o">.</span><span class="n">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">                    <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;refresh_sources&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">                    <span class="n">label</span><span class="o">=</span><span class="s2">&#34;Refresh&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">                    <span class="n">icon</span><span class="o">=</span><span class="n">icon_svg</span><span class="p">(</span><span class="s2">&#34;arrow-repeat&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">                <span class="p">)</span>
</span></span><span class="line"><span class="cl">            <span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">],</span>
</span></span><span class="line"><span class="cl">    <span class="n">drawer</span><span class="o">=</span><span class="n">chat_drawer</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">p</span><span class="p">(</span><span class="s2">&#34;Select a result to inspect it here.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="n">title</span><span class="o">=</span><span class="s2">&#34;Latest result&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="nb">open</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
</div>
</div>
<p>Users see the <strong>Clear conversation</strong> button while they chat, the <strong>Help</strong> button on every page, a <strong>Sources</strong> page with its own <strong>Refresh</strong> toolbar, and a <strong>Latest result</strong> drawer beside the conversation.</p>
</div>
</details>
<h2 id="show-how-the-model-reached-an-answer">Show how the model reached an answer
</h2>
<p>Understanding how an LLM arrived at an answer is just as &mdash; if not more &mdash; important than getting the answer from the model.
A response can include ordinary text, thinking content, web activity, citations, tool calls, tool results, and custom UI.
shinychat works hard to make the model&rsquo;s work visible and presents each part in a way that helps users understand the answer and what produced it.</p>
<h3 id="keep-tool-calls-readable">Keep tool calls readable
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/tool-calls-collapsed.png" data-fig-alt="A sales assistant conversation where two SQL queries and a schema read appear as compact activity rows above the answer." />
<p>Tool calls are now shown as compact activity rows instead of letting them take over the conversation, refining the <a href="https://opensource.posit.co/blog/2025-11-20_shinychat-tool-ui">tool-call cards shinychat introduced last year</a>.
By default, related calls are grouped together into a single row, and users can still expand a group, open an individual call, and inspect the request and result when they need more detail.</p>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/tool-calls-expanded.png" data-fig-alt="The grouped tool-call row expanded to show the two SQL queries with row count and result previews." />
<p>Opening an individual call shows the request and the result in a card:</p>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/tool-calls-result.png" data-fig-alt="The SQL query expanded to a card showing the full tool call arguments and the query result as a small table." />
<p>Grouping keeps the answer readable, and the request and result stay one click away.
To customize grouping or register tools, see <a href="https://posit-dev.github.io/shinychat/r/articles/tool-ui.html" target="_blank" rel="noopener">Tool UI in shinychat for R</a>, <a href="https://shiny.posit.co/py/docs/genai-tools.html" target="_blank" rel="noopener">Tools in Shiny for Python</a>, <a href="https://ellmer.tidyverse.org/articles/tool-calling.html" target="_blank" rel="noopener">tool/function calling in ellmer</a>, or <a href="https://posit-dev.github.io/chatlas/get-started/tools.html" target="_blank" rel="noopener">tool calling in chatlas</a>.</p>
<h3 id="show-citations-for-web-search-and-fetch">Show citations for web search and fetch
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/citations-popover.png" data-fig-alt="An assistant response where each cited claim is underlined and a pill reading Internal report +1 marks the message&#39;s sources, with the citation popover open just below the pill showing the source name, a link, the supporting passage, and controls to move between the message&#39;s two citations." />
<p>Many LLM providers offer built-in web search and web fetch tools that let your agent search the web, and their APIs return citations when the model uses that content in a reply. shinychat now displays those citations automatically.</p>
<p>For example, here&rsquo;s how to register Claude&rsquo;s tools with an ellmer or chatlas client:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-7" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-7-1">R</a></li>
<li><a href="#tabset-7-2">Python</a></li>
</ul>
<div id="tabset-7-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">ellmer</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">client</span> <span class="o">&lt;-</span> <span class="nf">chat_anthropic</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">$</span><span class="nf">register_tool</span><span class="p">(</span><span class="nf">claude_tool_web_search</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">$</span><span class="nf">register_tool</span><span class="p">(</span><span class="nf">claude_tool_web_fetch</span><span class="p">())</span></span></span></code></pre></div></div>
</div>
<div id="tabset-7-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">chatlas</span> <span class="kn">import</span> <span class="n">ChatAnthropic</span><span class="p">,</span> <span class="n">tool_web_fetch</span><span class="p">,</span> <span class="n">tool_web_search</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">client</span> <span class="o">=</span> <span class="n">ChatAnthropic</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="s2">&#34;default_headers&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;anthropic-beta&#34;</span><span class="p">:</span> <span class="s2">&#34;web-fetch-2025-09-10&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">.</span><span class="n">register_tool</span><span class="p">(</span><span class="n">tool_web_search</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">.</span><span class="n">register_tool</span><span class="p">(</span><span class="n">tool_web_fetch</span><span class="p">())</span></span></span></code></pre></div></div>
</div>
</div>
<p>When this client is used with <code>chat_server()</code>, citations are connected directly to the portions of the assistant&rsquo;s response that they support.</p>
<p>Custom retrieval applications, like the RAG systems you can build with <a href="https://ragnar.tidyverse.org/" target="_blank" rel="noopener">ragnar</a> or <a href="https://opensource.posit.co/blog/2026-04-14_rag-with-raghilda">raghilda</a>, can use the same citation UI by prompting the assistant to use a <code>&lt;shiny-aside&gt;</code> tag to attach a source to a claim.</p>
<h3 id="stream-responses-and-show-thinking">Stream responses and show thinking
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/thinking-collapsed.png" data-fig-alt="An assistant response with a collapsed panel reading Thought for 4s between the user&#39;s question and the answer." />
<p>With <code>chat_server()</code> in R or <code>Chat(client=...)</code> in Python, shinychat streams responses and shows supported thinking content in a collapsible panel.
Users can cancel a slow response with the stop button or the Escape key, and the partial response stays in the conversation.</p>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/streaming-stop.png" data-fig-alt="While a response streams in, the send button at the right of the chat input becomes a red stop button." />
<h2 id="add-files-and-shortcuts">Add files and shortcuts
</h2>
<h3 id="attach-files">Attach files
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/attachments-plot.png" data-fig-alt="A plot attached to the chat input as a thumbnail chip above the prompt Explain this plot, with the attach button at the left of the input." />
<p>File attachments are now supported in shinychat! Your users can send images, PDFs, and text files through a file picker, drag and drop, or paste, and shinychat sends each file to the model alongside the user&rsquo;s message. When you use <code>chat_server()</code> in R or <code>Chat(client=...)</code> in Python, your app gets that support for free.</p>
<h3 id="add-slash-commands">Add slash commands
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/slash-commands-palette.png" data-fig-alt="The slash command palette open above the chat input, listing /help, /search, and /clear with short descriptions." />
<p>You can now register chat shortcuts, or <em>slash commands</em>, with <a href="https://posit-dev.github.io/shinychat/r/reference/chat_server.html" target="_blank" rel="noopener"><code>chat$slash_command()</code></a> in R or <a href="https://posit-dev.github.io/shinychat/py/api/Chat.html" target="_blank" rel="noopener"><code>@chat.slash_command()</code></a> in Python. The command palette appears when users type <code>/</code>, and they serve as a way to trigger server-side code, inject context or additional prompting, or even just take an action in your app, all from the chat input.</p>
<p>Check out the <a href="https://posit-dev.github.io/shinychat/r/" target="_blank" rel="noopener">shinychat for R</a> or <a href="https://posit-dev.github.io/shinychat/py/" target="_blank" rel="noopener">shinychat for Python</a> documentation for details.</p>
<h2 id="more-shinychat-powered-apps">More shinychat-powered apps
</h2>
<p>The next release of <a href="https://posit-dev.github.io/querychat/" target="_blank" rel="noopener">querychat</a> will bring these chat features to data applications, including conversation history, attachments, tool displays, and citations.
It will introduce a page-first <code>querychat_app()</code> workflow and a new <code>page()</code> API for adding querychat to an existing Shiny page.</p>
<p><a href="https://posit-dev.github.io/btw/news/index.html#btw-150" target="_blank" rel="noopener">btw 1.5.0</a> already uses shinychat 0.5.0 to give <code>btw_app()</code> a complete coding assistant for your R projects.
It adds conversation history, a <code>page_chat()</code> layout, and slash commands to an assistant that can use your R session, project files, and package documentation.</p>
<h2 id="a-few-changes-for-existing-apps">A few changes for existing apps
</h2>
<p>Existing <code>chat_ui()</code> applications remain supported when chat shares a page with other top-level content. When the conversation should fill the application instead, choose <code>page_chat()</code> and use it as the outermost page container; nesting it inside another page layout breaks the full-window layout and history experience.</p>
<p>In R, <code>chat_mod_ui()</code> and <code>chat_mod_server()</code> are soft-deprecated in favor of pairing <code>chat_ui()</code> and <code>chat_server()</code> by ID. In both languages, a startup message no longer seeds a conversation when history is enabled; use a greeting or append messages through the chat object instead.</p>
<p>The release also protects users from unsafe model-authored Markdown, shows an error when a response fails before streaming starts, and preserves tool results, citations, attachments, and other rich content when users return to a conversation.</p>
<p>With <code>page_chat()</code>, <code>chat_server()</code> or <code>Chat(client=...)</code>, and the history options, you can now give your users a complete chat application: saved conversations they can return to, messages they can edit into new branches, greetings and suggestions to start from, and responses with visible tool calls, citations, and thinking.</p>
<p>Read the <a href="https://posit-dev.github.io/shinychat/r/" target="_blank" rel="noopener">shinychat for R documentation</a> or the <a href="https://posit-dev.github.io/shinychat/py/" target="_blank" rel="noopener">shinychat for Python documentation</a> to explore the examples.
For the complete list of changes, see the <a href="https://github.com/posit-dev/shinychat/blob/main/pkg-r/NEWS.md" target="_blank" rel="noopener">R release notes</a> and the <a href="https://github.com/posit-dev/shinychat/blob/main/pkg-py/CHANGELOG.md" target="_blank" rel="noopener">Python changelog</a>.</p>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>We thank everyone who contributed to these releases, for opening issues,
submitting pull requests, and providing feedback:
<a href="https://github.com/bastianolea" target="_blank" rel="noopener">@bastianolea</a>,
<a href="https://github.com/bianchenhao" target="_blank" rel="noopener">@bianchenhao</a>,
<a href="https://github.com/christophsax" target="_blank" rel="noopener">@christophsax</a>,
<a href="https://github.com/cpsievert" target="_blank" rel="noopener">@cpsievert</a>,
<a href="https://github.com/crissthiandi" target="_blank" rel="noopener">@crissthiandi</a>,
<a href="https://github.com/elnelson575" target="_blank" rel="noopener">@elnelson575</a>,
<a href="https://github.com/gadenbuie" target="_blank" rel="noopener">@gadenbuie</a>,
<a href="https://github.com/Harshit28j" target="_blank" rel="noopener">@Harshit28j</a>,
<a href="https://github.com/JamesHWade" target="_blank" rel="noopener">@JamesHWade</a>,
<a href="https://github.com/jcheng5" target="_blank" rel="noopener">@jcheng5</a>,
<a href="https://github.com/jlxAtNovozymes" target="_blank" rel="noopener">@jlxAtNovozymes</a>,
<a href="https://github.com/jnhyeon" target="_blank" rel="noopener">@jnhyeon</a>,
<a href="https://github.com/jose-c-milliman" target="_blank" rel="noopener">@jose-c-milliman</a>,
<a href="https://github.com/kaipingyang" target="_blank" rel="noopener">@kaipingyang</a>,
<a href="https://github.com/lucasrod16" target="_blank" rel="noopener">@lucasrod16</a>,
<a href="https://github.com/markmcd" target="_blank" rel="noopener">@markmcd</a>,
<a href="https://github.com/nbenn" target="_blank" rel="noopener">@nbenn</a>,
<a href="https://github.com/parmsam" target="_blank" rel="noopener">@parmsam</a>,
<a href="https://github.com/schloerke" target="_blank" rel="noopener">@schloerke</a>,
<a href="https://github.com/shea-parkes" target="_blank" rel="noopener">@shea-parkes</a>,
<a href="https://github.com/simonpcouch" target="_blank" rel="noopener">@simonpcouch</a>,
<a href="https://github.com/slupczynskim" target="_blank" rel="noopener">@slupczynskim</a>,
<a href="https://github.com/thisisnic" target="_blank" rel="noopener">@thisisnic</a>,
<a href="https://github.com/wlandau" target="_blank" rel="noopener">@wlandau</a>, and
<a href="https://github.com/xx02al" target="_blank" rel="noopener">@xx02al</a>.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>If you&rsquo;re new to LLM apps with Shiny, <a href="https://opensource.posit.co/blog/2025-09-15_shiny-side-of-llms-part-3">Build Your First LLM App with Shiny</a> walks through the process from the beginning in detail.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/og-header.png" length="78200" type="image/png" />
    </item>
    <item>
      <title>Positron September Release Highlights</title>
      <link>https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/</link>
      <pubDate>Wed, 09 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/</guid>
      <dc:creator>Julia Silge</dc:creator><description><![CDATA[<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p><a href="https://positron.posit.co" target="_blank" rel="noopener">Positron</a> is Posit&rsquo;s new, next-generation IDE for data science. Positron is designed to be an extensible, polyglot tool for exploring data and reproducible authoring in Python, R, and more.</p>
</div>
</div>
<p>Welcome back to another edition of our monthly Positron updates! Each month we share highlights from our <a href="https://positron.posit.co/release-notes" target="_blank" rel="noopener">latest release</a> and useful resources. <a href="https://opensource.posit.co/blog/2026-08-13_positron-2026-08-release">Last release</a> we told you about new Data Connections sources, a round of polish for inline output in Quarto documents, and help installing missing packages. This milestone brings a redesigned welcome page, a first version of Import Data, new Posit Assistant features, expanded Data Connections, package vulnerability scanning, and a more responsive Console.</p>
<h2 id="welcome-page-refresh-and-interpreter-setup">Welcome page refresh and interpreter setup
</h2>
<p>We redesigned the Positron welcome page. It now leads with an environment setup card that checks whether Python and R are ready to use, with actions to help resolve any problem it finds. The Positron badge and name now come with a <strong>Help</strong> button that opens the Help pane, and a banner links to the walkthroughs, including a new &ldquo;Get Started with Positron&rdquo; walkthrough that covers the Positron panes, keyboard shortcuts, built-in extensions, and Git.</p>
<img src="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/welcome-page.gif" data-fig-align="center" data-fig-alt="The redesigned Positron Welcome page, showing an Environment setup card with Python checks (3 of 4 passed) including a Create Python Environment button, and R already set up successfully." />
<p>The environment setup theme continues into interpreter selection itself. When you select a Python managed by your operating system or a package manager, Positron now offers to create a virtual environment for your workspace instead of installing packages into that shared interpreter. With no folder open, the environment Positron creates now lives at <code>~/.virtualenvs/positron</code> rather than <code>~/.venv</code>, so it stays in the interpreter picker after a restart, and Positron asks before creating an environment in your home directory. We also removed the confusing startup notification that reported no interpreters were found while linking to documentation saying no setup was needed, and interpreters installed under <code>/opt/python</code> are now labeled <code>Global</code> instead of <code>Unknown</code> in the interpreter picker.</p>
<h2 id="import-data">Import Data
</h2>
<p>Before we started work this month, importing data via the Positron UI was our most upvoted feature request and this release now delivers a first version. When you view a CSV or TSV file in the Data Explorer, a new <strong>Import Data</strong> button in the action bar opens a dialog. The dialog shows the code to load that file into a data frame. You can copy the code, or click <strong>Import</strong> to run it in the console, starting a session if one is not already running.</p>
<img src="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/import-data-excel.gif" data-fig-align="center" data-fig-alt="An Excel spreadsheet open in the Data Explorer with an Import Data button in the action bar, next to a Python console session ready to run the generated import code." />
<p>Import Data supports CSV and TSV files in Python with pandas and in R with the readr package, as well as Excel workbooks and Parquet files (with readxl and nanoparquet in R). The generated code can reproduce the filters and sorts you have applied in the Data Explorer, and it names the file by a workspace-relative path when the file is inside your workspace, so the code is easier to share and rerun. You can open the dialog from the Data Explorer, the File menu, the Variables pane, or the File Explorer context menu.</p>
<h2 id="posit-assistant">Posit Assistant
</h2>
<p>This release brings a new <strong>Agent Layout</strong> that opens <a href="https://pos.it/assistant" target="_blank" rel="noopener">Posit Assistant</a> in the editor area with a compact Session pane, giving you more visibility into the agent&rsquo;s actions as it works alongside your code. Configuring language model providers also gets a redesign. Our new Configure LLM Providers modal groups providers by connection state, so you can see at a glance which providers are ready to use. If you have trouble with the new dialog and need to switch back, set <a href="positron://settings/assistant.newProviderModal"><code>assistant.newProviderModal</code></a> to <code>false</code>.</p>
<img src="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/provider-modal-dialog.png" data-fig-align="center" data-fig-alt="The Configure LLM Providers modal in Positron, listing connected providers (Posit AI Pass, Anthropic, GitHub Copilot) and additional model providers available to connect (Amazon Bedrock, Microsoft Foundry, OpenAI)." />
<p>You can now configure multiple custom providers, each with its own name, type, endpoint, credential, and model list; the previous single &ldquo;Custom Provider&rdquo; option is now called &ldquo;OpenAI Compatible&rdquo; to better match what it actually does. Amazon Bedrock users get a smoother experience as well. An expired AWS SSO session can be renewed right from the provider modal instead of requiring <code>aws sso login</code> in a terminal, and the AWS profile and region can now be set in the configuration dialog rather than only through environment variables or a hand-edited <code>providers.json</code>. Speaking of which, <code>providers.json</code> now accepts comments, and your comments survive edits that Positron makes to the file.</p>
<h2 id="data-connections">Data Connections
</h2>
<p>The Data Connections preview keeps growing. A new ODBC data connection driver lets you browse any database with an installed ODBC driver in the Connections pane and open it in the Data Explorer. Data sources already configured on your machine appear automatically. Databricks gains OAuth sign-in on desktop and reads <code>DATABRICKS_TOKEN</code>, <code>DATABRICKS_HOST</code>, and <code>DATABRICKS_CONFIG_FILE</code> credentials managed by Posit Workbench automatically. A <strong>Disconnect</strong> option in the context menu closes a connection and any Data Explorers opened from it, and each data connection driver now gets its own log output channel.</p>
<p>Smaller improvements round out the preview. You can now set <a href="positron://settings/dataConnections.enabled"><code>dataConnections.enabled</code></a> per workspace, so a repository can turn on the Connections pane for anyone who opens it. The tree is shallower so table and column names get more of the panel&rsquo;s width, and a new <a href="positron://settings/dataConnections.tree.indent"><code>dataConnections.tree.indent</code></a> setting controls the indentation. DuckDB connections now default to read-only, so the Connections pane and a Python or R session can have the same database open at once; when a lock conflict does happen, the error now explains that another session has locked the database.</p>
<h2 id="package-security-vulnerabilities">Package security vulnerabilities
</h2>
<p>The Packages pane now shows known security vulnerabilities (Common Vulnerabilities and Exposures scoring) for installed Python and R packages, so you can see at a glance whether something in your environment has a known CVE. The data comes from your environment&rsquo;s own Posit Package Manager repository when it has one, and from the public Posit instance otherwise, so what you see reflects the same package source your organization already governs.</p>
<img src="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/packages-pane-cve.png" data-fig-align="center" data-fig-alt="The Packages pane showing the tornado package&#39;s Security tab with three known vulnerabilities listed by severity, each with a CVSS score, description, and the version where it was fixed." />
<h2 id="a-more-responsive-console">A more responsive Console
</h2>
<p>Console code submission is now faster, always shows visual feedback, and can be canceled while a completeness check is in flight; the Console no longer waits indefinitely with no feedback when a kernel is slow or unreachable. The Console breaks multi-statement input into complete expressions and executes them statement by statement for languages that support it. A new <a href="positron://settings/console.promptWhenIncomplete"><code>console.promptWhenIncomplete</code></a> setting runs submitted code immediately without a completeness check.</p>
<p>A few more Console fixes are worth knowing about. The Console no longer takes focus at runtime startup when you are working in another view or editor, <strong>Interrupt</strong> stays visible after switching between busy consoles, and session names now ellipsize to fit as the console tab list narrows.</p>
<h2 id="whats-coming-next">What&rsquo;s coming next
</h2>
<ul>
<li>posit::conf(2026) is next week! Our team will have several sessions on Positron, and there is still time to <a href="https://conf.posit.co/2026/" target="_blank" rel="noopener">register</a> to join us virtually from anywhere in the world.</li>
<li>Meet Posit at <a href="https://posit.co/events/cdao-government-2026" target="_blank" rel="noopener">CDAO Government</a> on September 22-23 in Washington, D.C. Stop by our booth to talk data modernization and where agentic AI fits in government.</li>
</ul>
<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title">Tip</span>
</div>
<div class="callout-body">
<p><a href="https://positron.posit.co/download" target="_blank" rel="noopener">Download Positron</a> to try out the new features and improvements in this release!</p>
</div>
</div>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/featured.svg" length="93678" type="image/svg&#43;xml" />
    </item>
    <item>
      <title>posit::glimpse() Newsletter – September 2026</title>
      <link>https://opensource.posit.co/blog/2026-09-02_glimpse-2026-09/</link>
      <pubDate>Wed, 02 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-02_glimpse-2026-09/</guid>
      <dc:creator>Isabella Velásquez</dc:creator><description><![CDATA[<blockquote>
<p>Welcome to our newsletter, posit::glimpse()!</p>
<p>If you&rsquo;re currently reading this on our blog, consider subscribing to Product Updates - Open Source on our <a href="https://posit.co/about/subscription-management" target="_blank" rel="noopener">subscription page</a> to receive this newsletter directly in your inbox.</p>
</blockquote>
<p>Welcome to this month&rsquo;s roundup of the latest open-source developments from Posit! Our update list is slightly shorter this time around, because our team is hard at work putting the final touches on <a href="https://posit.co/conference/" target="_blank" rel="noopener"><strong>posit::conf</strong></a>!</p>
<p>In this special feature, we are spotlighting a few presentations that will be broadcast live throughout the conference. Be sure to <a href="https://conf.posit.co/2026/registration/" target="_blank" rel="noopener"><strong>register today</strong></a> if you&rsquo;d like to tune in live. And, if you enjoy being chronically online like me, I&rsquo;ll be hanging out in the Discord community server throughout the event, alongside your 1000+ closest data pals 👾</p>
<h2 id="key-product-updates-and-new-releases">Key product updates and new releases
</h2>
<h3 id="positron-august-release-highlights">Positron August Release Highlights
</h3>
<p>The <a href="https://positron.posit.co/" target="_blank" rel="noopener">Positron</a> 2026.08 Release blog post highlights several key updates and improvements to Posit’s next-generation data science IDE, including expanded Data Connections (preview), more polished Quarto inline output, centralized AI provider configuration, and performance and reliability upgrades.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-08-13_positron-2026-08-release/">Positron August Release Highlights</a> blog post.</li>
</ul>
<h3 id="kimi-k3-and-glm-52-are-now-in-posit-ai">Kimi K3 and GLM 5.2 are now in Posit AI
</h3>
<p>Posit has added two new open-weights models, Kimi K3 and GLM 5.2, to the <a href="https://posit.ai" target="_blank" rel="noopener">Posit AI</a> platform. Both models stream tokens nearly twice as fast as Anthropic’s models in internal testing and offer lower cost-per-token rates (partly due to more efficient tokenizers and no extra charge for cache writes).</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-08-10_kimi-k3-glm-5-2-posit-ai/">Kimi K3 and GLM 5.2 are now in Posit AI</a> blog post.</li>
<li>Learn how to pick your models in the <a href="https://opensource.posit.co/blog/2026-08-14_ai-newsletter/">AI Newsletter: How to choose a model</a> blog post.</li>
</ul>
<h3 id="cudaml-040">cuda.ml 0.4.0
</h3>
<p><a href="https://mlverse.github.io/cuda.ml/" target="_blank" rel="noopener">cuda.ml</a> is an R package that brings <a href="https://docs.nvidia.com/cuml/" target="_blank" rel="noopener">NVIDIA GPU-accelerated machine learning</a> directly to R workflows. This release introduces streamlined setup and developer experience and expanded tree-ensemble inference.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-08-21_cuda-ml-0-4-0/">cuda.ml 0.4.0: GPU-accelerated machine learning from R</a> blog post.</li>
</ul>
<h3 id="orbital-060">Orbital 0.6.0
</h3>
<p><a href="https://posit-dev.github.io/orbital/" target="_blank" rel="noopener">Orbital</a> converts Scikit-learn pipelines into SQL queries so that they can run in your database. Orbital 0.6.0 adds PyTorch neural network support, enabling trained torch.nn.Sequential models to compile directly to SQL for database-native inference without requiring a Python runtime, ONNX Runtime, or separate model server.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-08-17_pyorbital-0-6-0/">Neural networks in Orbital for Python 0.6.0: PyTorch straight to your database</a> blog post.</li>
</ul>
<h3 id="recipes-140">recipes 1.4.0
</h3>
<p><a href="https://recipes.tidymodels.org/" target="_blank" rel="noopener">recipes</a> lets you create a pipeable sequence of feature engineering steps. Recipes 1.4.0 introduces a new way to look inside a recipe partway through, a substantial speedup for steps that are applied to many columns, and multi-column support in <code>step_regex()</code> and <code>step_count()</code>.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-08-26_recipes-1-4-0/">recipes 1.4.0</a> blog post.</li>
</ul>
<h3 id="themis-110">themis 1.1.0
</h3>
<p><a href="https://themis.tidymodels.org/" target="_blank" rel="noopener">themis</a> contains extra steps for the recipes package for dealing with unbalanced data. Version 1.1.0 adds eleven new sampling steps for handling unbalanced data. It also adds setting sampling targets per class and more distance metrics.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-08-13_themis-1-1-0/">themis 1.1.0</a> blog post.</li>
</ul>
<h2 id="new-cheatsheets">New cheatsheets
</h2>
<p>We’ve refreshed our cheatsheets page, which now features three brand-new additions!</p>
<ul>
<li><strong>Python Polars:</strong> Developed in partnership with Polars, Inc., this cheatsheet introduces Polars core concepts and key expressions.</li>
<li><strong>tidymodels:</strong> Updated cheatsheets detailing practical workflows across the entire tidymodels ecosystem.</li>
<li><strong>yardstick:</strong> Guidance on using yardstick within tidymodels to evaluate model predictive performance.</li>
</ul>
<p>Check them below:</p>















  
  
  
  
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  



<div class="grid grid-cols-3 gap-6 xl:gap-8 xl:gap-8 mb-6">
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  















  
  






  





  
  
    
  
    
  



















































<div id="item-2908cd68b8ba4555ebed001a8fc489bd" class="@container h-full">
  <a href="https://opensource.posit.co/resources/cheatsheets/polars/" title="Python Polars: The Definitive Cheatsheet"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #cd792c 25%, white 75%);">
      
        









  
  
    <img src="https://opensource.posit.co/resources/cheatsheets/polars/hex-polars.svg" alt="Python Polars: The Definitive Cheatsheet" class="mx-auto h-full object-contain px-[20%] py-[5%]" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Python Polars: The Definitive Cheatsheet</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Quick reference guide for transforming, analyzing, and visualizing data with Python Polars</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/jeroen-janssens/jeroenjanssens-headshot-2021.png"
          alt="Jeroen Janssens"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ><img
          src="https://opensource.posit.co/people/thijs-nieuwdorp/thijs-nieuwdorp.png"
          alt="Thijs Nieuwdorp"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white -ml-2"
          style="z-index: 9;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Jeroen Janssens,&nbsp;Thijs Nieuwdorp</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Great Tables
              </span>
            
              <span class="pill">
                plotnine
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  















  
  






  





  
  
    
  



















































<div id="item-a3d4e12169eb42646b2fdafefb47cfdd" class="@container h-full">
  <a href="https://opensource.posit.co/resources/cheatsheets/ml-tidymodels/" title="Machine learning with tidymodels"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #1C1C29 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/software/tidymodels/logo_hu_ca5e9532cdddf882.webp 1x,
                  /software/tidymodels/logo_hu_eb8d68152adc5d81.webp 2x" />
        <img
          src="https://opensource.posit.co/software/tidymodels/logo_hu_84b90ab5614abc10.png"
          srcset="/software/tidymodels/logo_hu_84b90ab5614abc10.png 1x,
                  /software/tidymodels/logo_hu_d8a687753dd491a7.png 2x"
          alt="tidymodels"
          class="mx-auto h-full object-contain px-[20%] py-[5%]"
          loading="lazy" />
      </picture>
    
      
      

      
      
        
      
      
        
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/software/tidymodels/logo_hu_eb8d68152adc5d81.webp 1x,
                  /software/tidymodels/logo_hu_eb8d68152adc5d81.webp 2x" />
        <img
          src="https://opensource.posit.co/software/tidymodels/logo_hu_d8a687753dd491a7.png"
          srcset="/software/tidymodels/logo_hu_d8a687753dd491a7.png 1x,
                  /software/tidymodels/logo_hu_d8a687753dd491a7.png 2x"
          alt="tidymodels"
          class="mx-auto h-full object-contain px-[20%] py-[5%]"
          loading="lazy" />
      </picture>
    
      
      

      
      
        
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/software/tidymodels/logo_hu_eb8d68152adc5d81.webp 1x,
                  /software/tidymodels/logo_hu_eb8d68152adc5d81.webp 2x" />
        <img
          src="https://opensource.posit.co/software/tidymodels/logo_hu_d8a687753dd491a7.png"
          srcset="/software/tidymodels/logo_hu_d8a687753dd491a7.png 1x,
                  /software/tidymodels/logo_hu_d8a687753dd491a7.png 2x"
          alt="tidymodels"
          class="mx-auto h-full object-contain px-[20%] py-[5%]"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Machine learning with tidymodels</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">A map of the tidymodels packages, grouped by where each one fits in the machine learning workflow</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/edgar-ruiz/profile.jpg"
          alt="Edgar Ruiz"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ><img
          src="https://opensource.posit.co/people/mine-%C3%A7etinkaya-rundel/profile.jpg"
          alt="Mine Çetinkaya-Rundel"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white -ml-2"
          style="z-index: 9;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Edgar Ruiz,&nbsp;Mine Çetinkaya-Rundel</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                tidymodels
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  















  
  






  





  
  
    
  



















































<div id="item-de272c2135908741feb1e0b0f2c223a2" class="@container h-full">
  <a href="https://opensource.posit.co/resources/cheatsheets/ml-measure-performance/" title="Measure model performance with yardstick"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #DB1E25 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/software/yardstick/logo_hu_89544a764e9e99f0.webp 1x,
                  /software/yardstick/logo_hu_1a82d12a9e8dfc22.webp 2x" />
        <img
          src="https://opensource.posit.co/software/yardstick/logo_hu_e59943c1b04b29e0.png"
          srcset="/software/yardstick/logo_hu_e59943c1b04b29e0.png 1x,
                  /software/yardstick/logo_hu_866c2a6b59c395dc.png 2x"
          alt="yardstick"
          class="mx-auto h-full object-contain px-[20%] py-[5%]"
          loading="lazy" />
      </picture>
    
      
      

      
      
        
      
      
        
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/software/yardstick/logo_hu_1a82d12a9e8dfc22.webp 1x,
                  /software/yardstick/logo_hu_1a82d12a9e8dfc22.webp 2x" />
        <img
          src="https://opensource.posit.co/software/yardstick/logo_hu_866c2a6b59c395dc.png"
          srcset="/software/yardstick/logo_hu_866c2a6b59c395dc.png 1x,
                  /software/yardstick/logo_hu_866c2a6b59c395dc.png 2x"
          alt="yardstick"
          class="mx-auto h-full object-contain px-[20%] py-[5%]"
          loading="lazy" />
      </picture>
    
      
      

      
      
        
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/software/yardstick/logo_hu_1a82d12a9e8dfc22.webp 1x,
                  /software/yardstick/logo_hu_1a82d12a9e8dfc22.webp 2x" />
        <img
          src="https://opensource.posit.co/software/yardstick/logo_hu_866c2a6b59c395dc.png"
          srcset="/software/yardstick/logo_hu_866c2a6b59c395dc.png 1x,
                  /software/yardstick/logo_hu_866c2a6b59c395dc.png 2x"
          alt="yardstick"
          class="mx-auto h-full object-contain px-[20%] py-[5%]"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Measure model performance with yardstick</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Quick reference guide for measuring how well a model predicts with yardstick</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/edgar-ruiz/profile.jpg"
          alt="Edgar Ruiz"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Edgar Ruiz</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                yardstick
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
</div>


<h2 id="positconf2026-talk-sneak-peeks">posit::conf(2026) talk sneak peeks
</h2>
<p>With over 100 talks, it’s impossible to feature all of them in this newsletter (but you can explore the complete lineup on the <a href="https://conf.posit.co/2026/sessions/" target="_blank" rel="noopener">event schedule</a>!). I wanted to give a quick preview of topics you can look forward to (whether you tune in live during the conference or catch up on demand).</p>
<ol>
<li>
<h3 id="positron-in-prime-time">Positron in prime time
</h3>
</li>
</ol>
<p>It’s been about two years since the public release of Positron, and 🎵this IDE is on fire 🎵</p>
<p>The lineup of conf talks proves it. From Quarto notebooks in Positron (did you know <a href="https://positron.posit.co/quarto-inline-output.html" target="_blank" rel="noopener">inline output is available</a>?!), to using Positron in education, to how it treats SQL as a first-class language, to delightful workflows in Python and R, come see what people are cooking up with Positron.</p>
<ol start="2">
<li>
<h3 id="what-cant-you-do-with-quarto">What can’t you do with Quarto?
</h3>
</li>
</ol>
<p>The best way of discovering what Quarto can do is seeing how others are using it!</p>
<p>We’re starting off strong, with the first session of Virtual Day (September 14th) being “Quarto, R + Python”, where Björn Fisseler will discuss creating accessible reports and Wasim Lorgat sharing the history of notebooks. The Quarto theme continues on the 15th and 16th with talks on designing influential and scalable reports, creating learning ecosystems, teaching bilingual data science, developing wiki chatbots, and developing unreasonably effective dashboards and slides — all in Quarto.</p>
<ol start="3">
<li>
<h3 id="ill-definitely-be-joining">I’ll definitely be joining…
</h3>
<ul>
<li><strong>Positron and the Three Bears: Teaching Python with Positron</strong> (presented by Marc Dotson) - Practical lessons from an educator navigating Python instruction and finding the sweet spot with Positron</li>
<li><strong>First Impressions Matter: Styling Data Products That People Actually Want to Use</strong> (presented by Shelby Level) - Shelby creates visually striking data products, and I can’t wait to pick up some design inspiration and techniques from her session</li>
<li><strong>A Grammar of Graphics for SQL</strong> (presented by Thomas Lin Pedersen) - We’ll hear the developer of ggsql share the story of bringing ggplot2-style visualization concepts to SQL</li>
<li><strong>Outgrowing Spreadsheets: Rebuilding Research Data Collection with Shiny and Posit Connect</strong> (presented by Kelsey Chalmers) - Kelsey shares the before-and-after architecture and how their research team transformed a fragile, spreadsheet-based data collection process into a sustainable system using Shiny and Posit Connect</li>
</ul>
</li>
</ol>
<p>Of course, this is just the tip of the conf iceberg. One of my favorite things about conf is the diversity of talks, from real-world data science implementation, to insights from the field, to creative and whimsical experiments. I hope to <a href="https://conf.posit.co/2026/registration/" target="_blank" rel="noopener">see you there</a>!</p>
<p>If you can’t wait til conf (or if you’re reading after conf is over!), there are other events that you can join us at:</p>
<ul>
<li><a href="https://pos.it/dslab" target="_blank" rel="noopener">Data Science Lab</a>, every Tuesday at 12pm ET</li>
<li><a href="https://pos.it/dsh" target="_blank" rel="noopener">Data Science Hangout</a>, every Thursday at 12pm ET</li>
<li><a href="https://events.zoom.us/ev/Ajss5j9VeRMe0zw-AtFKf7AUAsthzYhaYjYPeEIu1uYAQe1K0ud1~Agb_hSt1UGxd9fUyIDC32e6jAdEtbl7G_AaLZUYhRvyZR5cGpY5Kp_A0-w?mkt_tok=NzA5LU5YTi03MDYAAAGhT3GTQTQ5s7LDxqZGUAE1zALOLmEDysbAsOyvVdJ9P72DB_IRwtWRTED6kyJA-j-YKF7WxCTY_ZlZ4rTkiyY" target="_blank" rel="noopener">Building Repeatable AI Workflows with Custom MCP Servers</a>, September 30</li>
<li><a href="https://opensource.posit.co/events/" target="_blank" rel="noopener">Our next conference appearance</a></li>
</ul>
<p>Have a lovely September, and reach out anytime! isabella [dot] velasquez [at] posit [dot] co</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-02_glimpse-2026-09/thumbnail.jpg" length="68574" type="image/jpeg" />
    </item>
  </channel>
</rss>
