Course Code: bpfapi
Duration: 21 hours
Course Outline:

  1. Microservices vs. Monolithic Apps
  2. Functionality overview FastAPI:
    1. Code structure
    2. How to create an app?
    3. Dependency injection
  3. Synchronous and asynchronous processing
    1. Introduction
    2. Using external libraries
  4. Building data models using pydantic , including:
    1. Validations
    2. Metadata
    3. Nested models
  5. Query handling - sending:
    1. Data in JSON format
    2. Files
  6. Response handling:
    1. JSON
    2. Streaming
    3. Custom response codes
  7. Request authentication:
    1. Basic auth
    2. JWT
  8. Integration with SQLALchemy:
    1. Transaction handling
    2. Model building, validation, hybrid models
    3. Best practices for working with SQLAlchemy
  9. Background tasks:
    1. Background Tasks FastAPI
    2. Celery Integration:
      1. Backend selection
      2. Configuration
      3. Weaknesses / strengths of individual solutions
    3. Building an application using FastAPI + celery + redis as a broker
  10. FastAPI and machine learning models:
    1. Best Practices for Exposing Your Model with FastAPI
    2. Use of cookiecutter
  11. Application testing
    1. Testing and asynchrony
    2. Introducing the pytest tool
    3. Mocking and patching
    4. Measuring code coverage with tests
    5. Integrating pytest with CI/CD environment
    6. Using testcontainers to perform functional testing
  12. Working on the project
  13. Summary