FastAPI – GET request results in typeerror (value is not a valid dict)
Pydantic 2 changed how models gets configured, so if you’re using the most recent version of Pydantic, see the section named Pydantic 2 below. SQLAlchemy does not return a dictionary, which is what pydantic expects by default. You can configure your model to also support loading from standard orm parameters (i.e. attributes on the object … Read more