⚡ FastAPI — Modern Web APIs

FastAPI — Web API with Python

Build high-performance REST APIs with FastAPI — covering async routes, Pydantic validation, JWT authentication, SQLAlchemy ORM, background tasks, WebSockets, automated docs, testing, and Docker deployment.

35 Hours
10 Modules
2+ Projects
✓ Certificate

Tools & Technologies Covered

⚡ FastAPI 📝 Pydantic v2 🧵 asyncio / async routes 🔒 JWT / OAuth2 🗄 SQLAlchemy ORM 📊 PostgreSQL / SQLite 🐳 Docker & Docker Compose 🧪 pytest + httpx 💬 WebSockets 📦 Alembic Migrations 🔧 uvicorn / gunicorn ☁ Azure / AWS deployment

Course Summary

Course Name FastAPI — Web API Development with Python
Duration 35 Hours (Online / Classroom)
Prerequisites Basic Python — OOP, functions, async basics helpful
Target Audience Python developers, backend engineers, full-stack developers
Certificate Yes — Industry-recognised certificate upon completion
Mode Online & Classroom — with recorded sessions for lifetime access

📋 Detailed Course Syllabus

🟢 FastAPI Fundamentals

1 Introduction to FastAPI & REST
  • What is FastAPI? — comparison with Flask, Django REST Framework
  • Setting up FastAPI project — pip install fastapi uvicorn, project structure
  • REST principles — resources, HTTP methods, status codes, headers
  • Creating your first GET endpoint — path parameters, query parameters
  • Automatic interactive docs — Swagger UI (/docs) and ReDoc (/redoc)
  • Running with uvicorn — reload mode, production configuration
  • ASGI vs WSGI — why FastAPI is asynchronous by design
2 Request & Response with Pydantic
  • Pydantic v2 models — BaseModel, field types, validators
  • Request body — POST / PUT with JSON body validation
  • Field validators (@field_validator) and model validators
  • Response models — filtering output fields, response_model
  • Nested models, optional fields, default values
  • Custom error responses — HTTPException, status codes
  • Form data and file uploads with Form, File, UploadFile
3 Async Routes & Dependencies
  • async def routes and await inside FastAPI handlers
  • Dependency Injection with Depends()
  • Reusable dependencies — database session, current user, pagination
  • Nested dependencies and dependency caching
  • Middleware — @app.middleware, CORS, request logging
  • Lifespan events — @asynccontextmanager startup / shutdown
  • Background tasks with BackgroundTasks

🟡 Database & Authentication

4 Database with SQLAlchemy & Alembic
  • SQLAlchemy 2.x async engine — create_async_engine, AsyncSession
  • Defining ORM models — DeclarativeBase, column types, relationships
  • CRUD operations — insert, select, update, delete with async ORM
  • Relationships — one-to-many, many-to-many, eager vs lazy loading
  • Database migrations with Alembic — revision, upgrade, downgrade
  • Repository pattern — separating data access from business logic
  • PostgreSQL setup with Docker Compose; SQLite for local dev
5 Authentication & Authorization
  • Password hashing with passlib — bcrypt and Argon2
  • JWT tokens — creating, signing, and verifying access/refresh tokens
  • OAuth2 password flow in FastAPI — OAuth2PasswordBearer
  • Protecting routes with the get_current_user dependency
  • Role-based access control (RBAC) — admin, editor, viewer roles
  • API key authentication for service-to-service calls
  • Token refresh strategy and logout (token blacklisting with Redis)

🟠 Advanced Features & Testing

6 Routers, Versioning & Error Handling
  • Organising routes with APIRouter — prefix, tags, dependencies
  • API versioning strategies — URL prefix (/v1, /v2)
  • Global exception handlers — @app.exception_handler
  • Custom exception classes and structured error responses
  • Request ID middleware for tracing
  • Rate limiting with slowapi
  • Pagination — limit/offset and cursor-based pagination
7 WebSockets & Background Tasks
  • WebSocket endpoint in FastAPI — WebSocket, connect, send_text, receive_text
  • Broadcasting messages to multiple clients using ConnectionManager
  • Background tasks for email sending, file processing, notifications
  • Celery with Redis/RabbitMQ — offloading heavy tasks from the request cycle
  • Scheduled tasks with APScheduler
  • Server-Sent Events (SSE) for real-time updates
8 Testing FastAPI Applications
  • Testing with pytest and httpx.AsyncClient
  • TestClient for synchronous tests; AsyncClient for async tests
  • Test database setup — in-memory SQLite with SQLAlchemy
  • Mocking dependencies — overriding Depends() in tests
  • Testing auth endpoints — register, login, protected routes
  • Code coverage with pytest-cov
  • Postman / Bruno collections for manual API testing
9 Deployment & Production
  • Dockerising FastAPI — Dockerfile, multi-stage builds, docker-compose.yml
  • Production server — gunicorn with uvicorn workers
  • Nginx as reverse proxy — HTTPS, load balancing
  • Environment variables — .env, pydantic-settings
  • Deploying to Azure App Service / AWS ECS
  • Health check endpoints and readiness probes for Kubernetes
  • CI/CD pipeline — GitHub Actions: test → build image → deploy
10 Capstone Project — Full CRUD REST API
📦 Project Options:
  • E-Commerce API — products, cart, orders, payments
  • Blog / CMS API — users, posts, comments, tags, search
  • Task Manager API — projects, tasks, assignments, notifications
✅ Must-Include:
  • JWT auth with refresh tokens
  • Async SQLAlchemy + PostgreSQL
  • Alembic migrations
  • pytest with >80% coverage
  • Docker Compose deployment
  • Swagger docs with examples

⚡ Build Fast, Modern APIs with Python!

35 hours — FastAPI, async, JWT, SQLAlchemy, Docker & real-world deployment.

Book FREE Demo Class WhatsApp Us

Start Your IT Career Today - Book a FREE Demo Class!

Azure, .NET, Java, Python, SQL Server - Online & Classroom Training with Placement Support

Enquire Now WhatsApp Us
;