Skip to content

3. Types, Pydantic & Intro to Testing

Goals

  • Read and write Python type hints, including generics and the union operator.
  • Run mypy to catch type errors before they hit runtime.
  • Define Pydantic models that validate data at runtime.
  • Write a first pytest test and run the suite with uv run pytest.