Coding task · Python course · Module 6: Async and FastAPI
Species model
Create a Pydantic model for a Safari species with validation.
Task
Write a Species model with fields: name (str), population (int > 0), habitat (str), endangered (bool, default False).