Pyodide with Quarto HTML Standalone Document Proof of Concept
Experiments with an Interactive Quarto Document using Pyodide v0.23.4
Demo
Background
The purpose of this document is to explore the pyodide WebAssembly interface to power interactive Quarto documents.
Setup
Sample Calculations
Let’s start off with a quick calculation
Strings
Viewing string data
Retrieving prior objects
Checking string length
Notice, we’re able to track the run value of code.
Define and Call Functions
Functions can be defined in one cell and called.
Similarly, they persist to other cells.
Load a package
We’ve enabled dynamic package detection to handle importing packages into the environment. The dynamic part comes from detecting whether a non-core Python package is used, installing, and, then, importing it.
Importing a package for the first time will require more time. Subsequent import statements will be resolve quicker.
Graphing
Graphing is not yet available.
Free-for-all
Feel free to explore adding your own Python code into this code cell. Note, you may also do the same with earlier cells.