2

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)

rmd_po
  • 381
  • 1
  • 4
  • 12
  • Check out this [tutorial](https://medium.com/swlh/python-in-web-easy-5f7de3813055) – Aray Karjauv Apr 12 '21 at 11:14
  • I created [this react+pyodide template](https://github.com/xhlulu/react-pyodide-template), which includes instructions to host on github pages – xhluca Jul 17 '21 at 00:03

1 Answers1

4

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.

rth
  • 10,680
  • 7
  • 53
  • 77