This repository contains the teaching materials for a 6-part Python Web Apps workshop series, as well as additional links and resources that may be useful for students and teachers.
Each workshop has a set of slides with exercises interleaved. We recommend giving students at least 20 minutes for each exercise and to allow ample time for exercise review and questions, so each workshop takes about 2.5-3 hours to teach.
The workshop series is designed to be taught in the following order:
Title | Slides | Slide files | Topics |
---|---|---|---|
Flask, Routing, Templates | View online | See in repo | Introduction to HTTP, web apps, setting up a Flask app, routing, and templates |
Databases and ORMs | View online | See in repo | Introduction to databases, SQLAlchemy, using Flask with SQLAlchemy |
Django | View online | See in repo | Introduction to Django framework |
FastAPI | View online | See in repo | Introduction to HTTP APIs and FastAPI |
Containerization | View online | See in repo | Introduction to Docker and containerization for Python web apps |
Testing Web Apps | View online | See in repo | Testing Python web apps with pytest and Playwright |
The slides are built using Reveal.js and are written in HTML. The exercises are GitHub repositories with dev containers for easy usage in GitHub Codespaces and VS Code.
These repositories can be used as starting points for student projects (and some of them are already used in the exercises). All repositories contain instructions for running the app locally, and many of them contain instructions for deploying to Azure. Other cloud providers can be used as well, but the steps would be different.
Repository | Description |
---|---|
simple-flask-server-example | A very simple Flask server |
simple-flask-server-container | A very simple Flask server, containerized with Docker |
simple-flask-api-container | An HTTP API built with Flask, containerized with Docker |
flask-charts-api-container-app | A charts API built with APIFlask and containerized with Docker |
flask-gallery-container-app | A gallery app built with Flask and containerized with Docker |
flask-db-quiz-example | A quiz app built with Flask, PostgreSQL and SQLAlchemy |
flask-surveys-container-app | A surveys app built with Flask, PostgreSQL and SQLAlchemy, containerized with Docker |
azure-flask-postgres-flexible-appservice | A tourism website built with Flask and PostgreSQL |
azure-flask-postgres-flexible-aca | A tourism website built with Flask and PostgreSQL, containerized with Docker |
msdocs-flask-postgresql-sample-app-azd | A restaurant review app built with Flask and PostgreSQL |
Repository | Description |
---|---|
django-quiz-app | A quiz app built with Django and PostgreSQL |
azure-django-postgres-flexible-aca | A tourism website built with Django and PostgreSQL |
azure-django-postgres-flexible-appservice | A tourism website built with Django and PostgreSQL, containerized with Docker |
msdocs-django-postgresql-sample-app-azd | A restaurant review app built with Django and PostgreSQL |
Repository | Description |
---|---|
simple-fastapi-container | A very simple FastAPI server, containerized with Docker |
staticmaps-function | A static maps API built with FastAPI |
regression-model-azure-demo | A regression model API built with FastAPI |
azure-fastapi-postgres-flexible-appservice | A tourism website built with FastAPI and PostgreSQL |
azure-fastapi-postgres-flexible-aca | A tourism website built with FastAPI and PostgreSQL, containerized with Docker |
These recordings cover topics related to the workshop materials, so they may be helpful for teachers or students using these materials.
Talk | Video | Slides | Description |
---|---|---|---|
Containerization 101 with Docker and Flask | Video | Slides | Interactive workshop that introducses Docker and containerization for Flask web apps |
Writing Python Web Apps with VS Code | Video | Slides | Customizing VS Code to work on Python web apps (Django specifically) - Dev Containers, Debugging, Testing, etc. |
1-click deploys of Python web apps to Azure | Video | Slides | Deploying Python web apps to Azure using the Azure Developer CLI |
Using PostgreSQL in VS Code | Video | -- | Using PostgreSQL in VS Code Dev Containers and Codespaces, using Docker and SQLTools extension |
We are planning to run an online workshop series using these materials in June 2024. Sign up here!
If you have any feedback on the materials, or if you'd like to contribute, please open an issue or submit a pull request. You can also open an issue if you're looking for materials or examples on a specific topic.