Catalogue
/
Software Development and Programming
/
FastAPI with Python for Modern API Development

FastAPI with Python for Modern API Development

A practical three day technical course for participants who are new to FastAPI and want to build reliable, maintainable APIs with Python. The agenda progresses from API design, routing, and validation through dependency injection, database integration, authentication, asynchronous programming, testing, and production deployment. The course focuses on practical development patterns that can be applied to modern backend services, data applications, and AI-enabled systems.

What will you learn?

You will learn how to design and implement REST APIs with FastAPI, define and validate structured data with Pydantic, and organize applications using routers and dependencies. You will work with databases, authentication, asynchronous request handling, automated testing, and error management. You will also learn how to package and deploy FastAPI applications in production-oriented environments.

  • Design structured REST APIs with clear routes, schemas, responses, and error handling
  • Implement validation, database access, authentication, and reusable dependencies
  • Use asynchronous programming appropriately for I/O-heavy API workloads
  • Test, package, deploy, and operate FastAPI applications reliably

Requirements:

  • Technical background in software development, data engineering, AI engineering, or a related field
  • Basic Python programming knowledge
  • General familiarity with HTTP, JSON, and web application concepts
  • Previous FastAPI experience is not required

Course Outline*:

*We customize the course outline and content to your specific needs and relevant use cases.

Module 1: FastAPI architecture and API fundamentals

  • Understanding FastAPI, ASGI, Starlette, Pydantic, and Uvicorn
  • Creating and running a FastAPI application
  • Defining routes for GET, POST, PUT, PATCH, and DELETE operations
  • Using automatically generated OpenAPI, Swagger UI, and ReDoc documentation

Module 2: API design and request handling

  • Designing resource-oriented endpoints and consistent URL structures
  • Working with path, query, header, cookie, and request body parameters
  • Choosing appropriate HTTP methods and status codes
  • Creating consistent response and error structures

Module 3: Data validation with Pydantic

  • Defining request and response models with Pydantic
  • Applying field types, constraints, defaults, and optional values
  • Working with nested models, collections, and reusable schemas
  • Separating input, output, and internal application models

Module 4: Application structure and dependency injection

  • Organizing endpoints with APIRouter and modular application components
  • Separating routes, schemas, services, configuration, and data access
  • Creating reusable dependencies for shared resources and application logic
  • Applying dependencies to endpoints, routers, authentication, and database access

Module 5: Database integration and persistence

  • Connecting FastAPI to relational databases with SQLAlchemy-based patterns
  • Managing database engines and request-scoped sessions
  • Implementing create, read, update, and delete operations
  • Separating database entities from API schemas and service logic

Module 6: Database relationships and transaction handling

  • Working with related entities and common relational data patterns
  • Loading and returning associated data through API endpoints
  • Managing transactions, commits, rollbacks, and database errors
  • Designing data access logic that remains testable and maintainable

Module 7: Authentication and authorization

  • Understanding authentication and authorization requirements for APIs
  • Implementing OAuth2 bearer authentication and JWT access tokens
  • Securing routes through reusable security dependencies
  • Applying user roles, permissions, password hashing, and secure configuration

Module 8: Asynchronous programming with FastAPI

  • Understanding synchronous and asynchronous endpoint execution
  • Using async and await with asynchronous databases and external services
  • Recognizing blocking operations that can reduce application performance
  • Deciding when synchronous code, asynchronous code, or background processing is appropriate

Module 9: Testing FastAPI applications

  • Testing endpoints with TestClient, HTTPX, and pytest
  • Verifying successful responses, validation errors, authentication, and edge cases
  • Overriding dependencies for isolated and repeatable testing
  • Testing asynchronous endpoints and database operations when required

Module 10: Error handling and API reliability

  • Using HTTPException and custom exception handlers consistently
  • Handling database, validation, and external service failures
  • Applying timeouts, retries, and clear failure responses
  • Adding logging and structured diagnostic information for troubleshooting

Module 11: Production application design

  • Managing application settings and environment-specific configuration
  • Handling CORS, middleware, startup resources, and application lifecycle concerns
  • Structuring code for maintainability as APIs and teams grow
  • Reviewing security, performance, dependency, and API versioning considerations

Module 12: Deployment and production readiness

  • Running FastAPI applications with Uvicorn in production-oriented environments
  • Containerizing applications and separating configuration from application code
  • Understanding workers, replication, HTTPS termination, and health checks
  • Building a practical production readiness checklist covering security, testing, logging, monitoring, deployment, and maintenance

Hands-on learning with expert instructors at your location for organizations.

4,347€*
Graph Icon - Education X Webflow Template
Level:
intermediate
Clock Icon - Education X Webflow Template
Duration:
21
Hours (days:
3
)
Camera Icon - Education X Webflow Template
Training customized to your needs
Star Icon - Education X Webflow Template
Immersive hands-on experience in a dedicated setting
*Price can range depending on number of participants, change of outline, location etc.

Master new skills guided by experienced instructors from anywhere.

3,012€*
Graph Icon - Education X Webflow Template
Level:
intermediate
Clock Icon - Education X Webflow Template
Duration:
21
Hours (days:
3
)
Camera Icon - Education X Webflow Template
Training customized to your needs
Star Icon - Education X Webflow Template
Reduced training costs
*Price can range depending on number of participants, change of outline, location etc.

Upcoming Sessions

10-12 Feb 2027
Dublin
10-12 Mar 2027
Vienna
1-3 Jun 2027
Stockholm
8-10 Jun 2027
Barcelona
7-9 Jul 2027
Brussels

Can't find a suitable date? Get in touch and we'll arrange one that works for you.

We use cookies to improve site navigation, analyse how the site is used, and support our marketing. You can accept all cookies, reject non-essential ones, or choose individual categories. Read our Cookie Notice