Pyodide interactive python web pages with Quarto

Gem City Tech, Dayton Dynamic Languages

Author
Affiliation

Aaron Nielsen

White Noise Technology, LLC

Published

March 12, 2025

Abstract

Interactive python code in web assembly using Quarto.

Follow along

https://whitenoisetech.codeberg.page/2025-03-12-ddl-pyodide/

Basic demonstration

Why?

  • Everything runs client-side in browser
    • No client configuration needed
    • Libraries and data can be loaded directly into the browser’s sandbox
  • Code and results are editable live
    • results from mods happen real time

Using

Quarto

  • Quarto is a markdown-based technical publishing system
    • web-pages
    • slides (reveal.js)
    • books
    • latex

Pyodide

  • Interfaces with Quarto via r-wasm/quarto-live
  • Pyodide compiles python to web assembly to run in the browser
  • large library of python packages via micropip
    • any other pure python package can be used
  • data has to be downloaded - no access to local file system
    • can be served as part of the web page resources

Pyodide interactive python web pages with Quarto by Aaron Nielsen is licensed under CC BY-NC-SA 4.0