Deploy Shiny for Python apps with GitHub Pages

Run Python code directly in a browser without Python installation (Part II of Shiny for Python series)

Bert Gollnick
4 min readOct 1, 2022
Photo by Philipp Katzenberger on Unsplash

In Part I of the Shiny for Python series we developed our first app and deployed it via shinylive.io. Now we want to use this app and deploy it to a static web hosting service. This could be any static web hosting like an Apache server, Amazon S3. We will do it with GitHub Pages.

You can learn how to implement this and all other aspects on Shiny for Python in my Udemy course (highly-discounted with the coupon MEDIUM).

Web App Deployment Strategies

Before we dive into it, let’s understand the different between traditional Python app hosting and deployment via WebAssembly. Boring! Nope. Stay with me. It will blow your mind.

Traditional web app deployment and deployment with WebAssembly (source: own illustration)

If you deploy a Python app in a traditional way you have a web server, which also has Python installed. It takes your source code and converts it to HTML, CSS, and JavaScript, before these files are sent to your browser. Your browser then just renders the page based on these files.

--

--

Bert Gollnick

Tech Developer with interests in coding, economics, and ecology