Put in order · Python course · Module 6: Async and FastAPI

Optional field

How do you define an optional field in Pydantic?

Items to put in order

  • Optional[str]
  • = None
  • description:

You can check the correct answer by solving this task in the CodeWorlds game.