Closed ninoseki closed 2 months ago
Appreciate the honesty. What's the most recent working version of FastAPI?
Will 0.1.4
still work with pydantic v1?
Update: I checked pydantic v1 with FastAPI 0.100.0 Everything, seems to work fine. I think the problem is just with v2.
Yes you can use the latest FastAPI (v0.100.0) with Pydantic v1.
The latest redis-om
can handle Pydantic v1 too. So the following dependencies are safe to use.
fastapi = "0.100.0"
pydantaic = ">=1.10.2,<2.0"
redis-om = "0.1.3"
I got similar error @ninoseki How can i handle if i use post method it gives me save is not working it's my first time of using redis plz help
I got similar error @ninoseki How can i handle if i use post method it gives me save is not working it's my first time of using redis plz help
pip install pydantic==1.10.13
should solve your problem
thanks @dgtlmonk ! It worked for me
I'm sorry I think I made a mistake in #533. I misunderstood that FastAPI (v0.100.0) has a compatibility in Pydantic v1 & v2 and it can use both versions as a response model & response body. But it doesn't.
For example, the following code fails because the latest FastAPI does not allow using Pydantic v1 as a response model & body class.
There is a workaround like the following.
But I think it's not good.
So it will be better to revert #533 if the FastAPI support has the high priority in this library. Again, sorry for my careless.