Django / FastAPI
Build Python web backends two ways: FastAPI for typed, async APIs with Pydantic and dependency injection, and Django for full-stack apps with its ORM, migrations, forms and admin, with every example run on Django 6.1 and FastAPI 0.142.
What you'll learn
- Choose between Django and FastAPI for a Python web project and set up either.
- Build FastAPI endpoints with typed parameters, Pydantic validation, response models, dependencies and error handlers.
- Model data with the Django ORM, create migrations, and write efficient queries without N+1 problems.
- Use Django views, URLs, forms, transactions and password hashing correctly.
- Test both frameworks with their test clients and dependency overrides.
- Harden and deploy Python web apps with security checks and ASGI/WSGI servers.
Syllabus
Python Web Frameworks
FastAPI Core Features
- Request and Response Models With Pydantic
- Dependency Injection With Depends
- Async Endpoints
- Automatic OpenAPI Documentation