Andy Jarrett // Code. Develop. Create.

Learning Python Offline with a PWA

Offline Python PWA Screenshot
Photo by Rubaitul Azad on Unsplash

TL;DR: Explore the offline Python PWA on GitHub: github.com/andyj/learn_python_offline_pwa and View The App Here

Learning Python Offline with a PWA

Why AI, Why Offline?

I’ve always wanted to get back to basics and truly understand Python’s core concepts without being tethered to a network. When my family and I started planning a trip I realised I’d be offline for a bit and I saw an opportunity. Why not build a Progressive Web App (PWA) that teaches Python fundamentals entirely client-side, even when you’ve got zero signal?

Building Skulpt Locally

Rather than pulling Skulpt from a CDN, I cloned the public repositories, ran the build process locally (with a quick nvm switch to Node 16 to avoid OpenSSL issues), and bundled the minified skulpt.min.js and skulpt-stdlib.js into dist/. That way the entire runtime ships with the app—no internet required.

Technical Highlights

  • Offline-first: A service worker precaches every HTML, CSS, JS and Skulpt asset.
  • Single page layout: Collapsible sidebar for navigation; main pane for lessons, code editors and quizzes.
  • Interactive code: Editable Python snippets powered by Skulpt, with real-time output.
  • Progress tracking: Quiz results saved in localStorage, so you can pick up where you left off.
  • Lightweight styling: Mobile-first, plain CSS, no frameworks, so it’s lightning fast and fully functional offline.

Try It Yourself

You can explore the code, clone the repo, or file issues over on GitHub:

🔗 https://github.com/andyj/learn_python_offline_pwa

Conclusion

Whether you’re a digital nomad, a commuter or just someone who likes to tinker offline, this PWA lets you learn Python wherever you are. Give it a spin on your device, just add it to your home screen and you’re good to go.

I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee. Your support keeps this site running and the coffee brewing! ☕️