Fastapi new version feature:
Response Model - Return Type
That's awesome
You can declare the type used for the response by annotating the path operation function return type
You can use type annotations the same way you would for input data in function parameters, you can use Pydantic models, lists, dictionaries, scalar values like integers, booleans, etc.
https://fastapi.tiangolo.com/tutorial/response-model/
Via @FastAPI #fastapi #python #python3 #restapi #programming #development