Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Executing Python via Pyodide in Github Pages

Is there any way I can run python in github pages? Specifically through Pyodide because I am using pandas. I know github pages is only meant to serve static pages using HTML/CSS/JS but I was wondering if there is a workaround with pyodide given that it is compiled in Javascript.

I am trying to build a small web application which has a username entry box that once submitted, calls some data from an API, processes in pandas and displays some visualizations (either using a JS library like Chart.js or Zingcharts, or otherwise matplotlib / seaborn)

like image 563
rmd_po Avatar asked Feb 19 '26 15:02

rmd_po


1 Answers

WebAssembly is run client side, so you can make a Pyodide application hosted on Github Pages (or any other hosting for static assets).

For downloading Pyodide packages/dependencies, the easiest is to use the JsDelivr CDN (cf pyodide docs), but you can also host them on Github pages if you prefer. The corresponding asset size should be within allowed usage limits.

like image 117
rth Avatar answered Feb 22 '26 04:02

rth