Incrementally Developing Your Web App With Jupyter and Klein
summary
Builds a running Klein/Twisted web app inside a Jupyter kernel and modifies endpoints without restarting; shares the async event loop so requests and Jupyter code run together. Demonstrates a five-second mock multiplication backend, shows naive serial calls take ~10s while issuing both requests then using gatherResults returns both in ~5s, implements XML-validated templates (useful error line numbers), adds sessions/CSRF-protected POST handling and confirms each incremental change works live in the browser.
AI-written summary · about
chapters (56)
- 0:00Introduction
- 2:58Moshe Zadka
- 3:24Interactive Development Environment
- 4:17Auto Reloading
- 5:19Writing the Application
- 5:31Twisted and Jupiter
- 6:33Inputting
- 7:05Putting things together
- 7:50And have the endpoint
- 8:06application
- 8:23working
- 8:48failure
- 9:00success
- 9:50content
- 10:17hello world
- 10:42one page
- 11:31hello world content
- 12:01dynamic computation
- 12:29responding to inputs
- 12:39adding a number
- 13:04interpolated result into HTML
- 13:20safe
- 13:50alternate reality
- 16:13multiplication
- 17:47speed test
- 18:19slow back end
- 19:34delayed multiplication without yield
- 20:34I chose the same URL
- 21:19The backend is slow
- 24:42Euclidean Distance
- 26:12Delayed Multiplication
- 26:29Math Formula Comment
- 27:05Math Formula Code
- 28:07Is it worth it
- 29:00HTML
- 29:14XML String
- 30:00Generic Greeting
- 30:23Attribute
- 30:35Interpolating
- 30:46Rendering
- 31:33Scaling
- 31:52Error Messages
- 32:08Fixing Error Messages
- 33:04Greetings
- 34:30Computation
- 35:04Default Name
- 35:20Renderer
- 35:52Name
- 36:51Wait a bit
- 37:23Posting is hard
- 38:42Memory Session Store
- 39:00PostRender
- 39:27CSRF
- 39:53The Square
- 40:04CSRF Protection
- 40:14Outro
