Friday October 29 3:00 PM – Friday October 29 3:30 PM in Talks I

From Jupyter Notebook to Production Web App, with Anvil and (only) Python

Meredydd Luff

Prior knowledge:
No previous knowledge expected


The best model or analysis in the world is no use if it's stuck in a Jupyter notebook. In this talk, I will show you how to turn a model into a web app, without being a full-stack developer. All you need is Python!

We'll start with a model in Jupyter, then we'll turn it into an interactive web app that colleagues or customers can use. Then we will deploy it to production.



  • Deployment: The process of turning something that works into something that's useful.
  • What are we going to do?
    • Introducing our model, in Jupyter
    • Introducing Anvil

Building a web UI for our model

  • Anvil's UI toolkit: Components, properties and drag-and-drop builder (live)
  • Create a user interface for our model (live coding)
  • Client-side Python (in the browser) vs server-side Python (on the server)
  • Setting up the Anvil Uplink: connect the code running in your notebook to our Anvil app (live coding)
  • Calling Jupyter code from client-side Python (live coding)
  • Connecting our UI to our notebook (live coding)
  • Demo: Upload a photo, get a result. (live)

We now have a graphical prototype our colleagues or even customers can use -- as long as this Jupyer notebook stays running...

Deploying it to production

  • Add authentication, so that only authorised users can use it (live coding)
    • Simplest approach: Magic Link login
    • Enterprise SSO (GSuite/Azure AD)

We now have a secure app that's safe to put on a public URL. But it still needs our Jupter notebook running...

  • Move our code to the Anvil server (live coding)
  • Shut down our Jupyter notebook
  • Demonstrate that it all still works!


  • Review the stages of deployment
  • Review how we accomplished each of them
  • Pointers to more resources