Course

Python Scalable APIs – with FastAPI and Flask («PYTAPI»)

An API does not have to be unnecessarily complicated. This course will teach you how to build practical, scalable and modern Python APIs with Flask and FastAPI that are lean, high-performance and maintainable.
Duration 2 days
Price 1'850.–
Course documents Digital courseware
New FastAPI and Flask for a high-performance web interface

Course facts

Key Learnings
  • Gaining an overview of Flask vs. FastAPI and comparing them
  • Understanding the architecture of modern, scalable APIs
  • Processing asynchronously and performance tuning
  • Developing REST APIs with both frameworks in a practical way
  • Validating, serialising and documenting with Pydantic and Swagger
  • Focusing on testability and extensibility
  • Understanding benchmarking and scaling scenarios
  • Knowing best practices for production-ready API projects
Content

This practical course demonstrates how to develop powerful, scalable APIs using Python. We compare the popular frameworks FastAPI and Flask, demonstrating their respective strengths and areas of application. Through hands-on exercises, you will learn to build and optimise your own RESTful APIs for performance and scalability, developing a sound understanding of modern API architectures in Python.

1 Overview and comparison: Flask vs. FastAPI

  • History and objectives of both frameworks
  • Synchronous vs. asynchronous programming model
  • Differences in routing, middleware, dependency injection
  • Community, extensibility and ecosystem
  • When is which framework suitable?

2 Architecture of modern, scalable APIs

  • Layered architecture: routers, services, repositories
  • API design principles (REST, stateless, idempotent)
  • OpenAPI / Swagger integration out-of-the-box
  • Separation of business and infrastructure logic
  • Caching, rate limiting, authentication

3 Asynchronous processing and performance tuning

  • Introduction to async/await in Python
  • WSGI vs. ASGI – differences and implications
  • Performance benefits of async I/O (e.g. for database access, HTTP requests)
  • Use of background tasks and queues
  • Comparison of servers: Uvicorn, Gunicorn, Hypercorn

4 Practical development of REST APIs with both frameworks

  • Project setup and structuring for Flask and FastAPI
  • Route definition, path parameters, query parameters
  • CRUD endpoints based on an example (e.g. «ToDo» app, blog, shop)
  • Database connection with SQLAlchemy or Tortoise ORM
  • Integration of external APIs / services

5 Validation, serialisation and documentation with Pydantic & Swagger

  • Introduction to Pydantic: Typing, validation, defaults
  • Creation of request and response models
  • Automatic OpenAPI generation and Swagger UI
  • Use of tags, description texts and examples
  • Efficient validation of data

6 Focus on testability and extensibility

  • Unit tests and integration tests for API endpoints
  • Test clients in FastAPI and Flask
  • Mocking external dependencies
  • Structuring for extensibility: services, blueprints, routers
  • Dependency injection and configuration management

7 Benchmarking and scaling scenarios

  • API benchmarking with tools such as ab, wrk, locust, k6
  • Comparison of the runtime performance of FastAPI vs. Flask
  • Scaling with Gunicorn, Uvicorn Workers, Docker & Kubernetes
  • Load balancing and horizontal scaling
  • Health checks and readiness probes

8 Best practices for production-ready API projects

  • Logging, monitoring, tracing (e.g. with Prometheus, OpenTelemetry)
  • Dealing with errors & exceptions (global handlers, structured error outputs)
  • Security aspects: CORS, Auth, HTTPS, rate limiting
  • Continuous integration / deployment (CI/CD) with Docker & GitHub Actions
  • Versioning of APIs (URI, header, media type)
Methodology & didactics

This course creates a sound understanding of the two web frameworks through an optimal mix of short theory blocks, guided exercises, practical examples and hands-on scenarios.

Target audience

This course is ideal for developers who want to develop clean, maintainable and high-performance interfaces with Python using the two powerful web frameworks FastAPI and Flask.

Requirements

We recommend the course «Introduction to Programming with Python» as preparation:

    Introduction to Programming with Python («PYTHON»)

    3 days
    • Basel, Berne, Geneva, Lausanne, Zürich
    CHF
    2'250.–

Download

Questions

Any questions?
First name
Last name
Company optional
Email
Phone
I would like to book this course as a company course
First name
Last name
Company
Email
Phone
Number of participants
Desired course location
Start date (DD.MM.YYYY)
End date (DD.MM.YYYY)

Choose your date

10
Nov
2025
11
Nov
2025
Zürich
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
10
Nov
2025
11
Nov
2025
Berne
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
10
Nov
2025
11
Nov
2025
Basel
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
19
Mar
2026
20
Mar
2026
Zürich
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
19
Mar
2026
20
Mar
2026
Berne
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
19
Mar
2026
20
Mar
2026
Basel
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
30
Jun
2026
1
Jul
2026
Zürich
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
30
Jun
2026
1
Jul
2026
Berne
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
30
Jun
2026
1
Jul
2026
Basel
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
21
Sep
2026
22
Sep
2026
Zürich
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
21
Sep
2026
22
Sep
2026
Berne
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
21
Sep
2026
22
Sep
2026
Basel
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
3
Dec
2026
4
Dec
2026
Zürich
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
3
Dec
2026
4
Dec
2026
Berne
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
3
Dec
2026
4
Dec
2026
Basel
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.
Next date
10
Nov
2025
11
Nov
2025
Zürich
German
Timetable
CHF 1’850.-
exkl. 8.1% Mwst.
CHF 1’850.-
exkl. 8.1% Mwst.