Skip to content Skip to content
Vladimir Chavkov

Python Web APIs with FastAPI Training

Build production-grade REST APIs with this intensive 3-day FastAPI training. Learn to design clean API architectures, validate data with Pydantic, handle requests asynchronously, and ship APIs with automatic OpenAPI documentation and comprehensive test coverage.

Duration3 days (24 hours)
LevelIntermediate
DeliveryIn-person, Live online, Hybrid
CertificationN/A
  • Python developers building web APIs
  • Backend engineers transitioning from Flask or Django
  • Full-stack developers needing API backends
  • Teams adopting FastAPI for new projects
  • Architects evaluating modern Python web frameworks

After completing this training, participants will be able to:

  • Design and implement RESTful APIs with FastAPI routing and path operations
  • Validate request and response data with Pydantic models and schemas
  • Build async endpoints for high-throughput API services
  • Implement authentication and authorization with OAuth2 and JWT
  • Generate and customize OpenAPI documentation automatically
  • Test APIs thoroughly with pytest and httpx

Module 1: FastAPI Setup and Routing

  • Project structure and application factory pattern
  • Path operations: GET, POST, PUT, DELETE, PATCH
  • Path parameters, query parameters, and request bodies
  • Hands-on: Build a CRUD API for a resource management system

Module 2: Pydantic Models and Validation

  • Defining request and response models
  • Field validation, custom validators, and computed fields
  • Nested models and model inheritance
  • Hands-on: Implement comprehensive input validation for a booking API

Module 3: Dependency Injection

  • FastAPI’s dependency injection system
  • Function and class dependencies
  • Dependency chains and shared state
  • Hands-on: Build a layered service architecture with DI

Module 4: Database Integration

  • SQLAlchemy ORM with async sessions
  • Database models, migrations with Alembic
  • Repository pattern for data access
  • Hands-on: Connect the API to PostgreSQL with full CRUD operations

Module 5: Authentication and Security

  • OAuth2 password flow with JWT tokens
  • Token refresh and revocation
  • Role-based access control and permissions
  • Hands-on: Secure API endpoints with authentication and authorization

Module 6: Middleware and Error Handling

  • Custom middleware for logging and CORS
  • Exception handlers and error response models
  • Rate limiting and request throttling
  • Hands-on: Add production middleware stack to the API

Module 7: Async Patterns

  • Async vs sync endpoints and when to use each
  • Background tasks and task queues
  • Streaming responses and WebSocket support
  • Hands-on: Build async endpoints with background processing

Module 8: Testing and Documentation

  • Testing with pytest and httpx TestClient
  • Test fixtures, factories, and database isolation
  • OpenAPI schema customization and documentation
  • Hands-on: Achieve full test coverage for the API

Module 9: Deployment and Operations

  • Running with Uvicorn and Gunicorn
  • Docker containerization for FastAPI apps
  • Health checks, structured logging, and monitoring
  • Hands-on: Package and deploy the API with Docker Compose
  • Python Fundamentals or equivalent programming experience
  • Comfort with functions, classes, and decorators
  • Basic understanding of HTTP methods and REST concepts
  • Familiarity with JSON data format
FormatDescription
In-PersonOn-site at your company’s location, hands-on with direct interaction
Live OnlineInteractive virtual sessions with screen sharing and real-time labs
HybridCombination of on-site and remote sessions, flexible scheduling

All formats include hands-on labs, course materials, starter project templates, and post-training support.