Upgrade to support pydantic 2.0+ #100
-
Currently pinned to pydantic<2.0.0 but pydantic 2.0 has been out for a few months. |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments
-
+1 for this |
Beta Was this translation helpful? Give feedback.
-
+1 for this |
Beta Was this translation helpful? Give feedback.
-
+1 for this |
Beta Was this translation helpful? Give feedback.
-
+1 for this |
Beta Was this translation helpful? Give feedback.
-
+1 for this |
Beta Was this translation helpful? Give feedback.
-
If you are using pydantic v2 and sqlalchemy 2.0 and above, try this sqlalchemy-to-pydantic |
Beta Was this translation helpful? Give feedback.
-
For those looking for a link to the source code behind sqlalchemy-to-pydantic, it's here: https://github.com/wezhai/sqlalchemy-to-pydantic. Linking sqlalchemy-to-pydantic's source to PyPI was requested in wezhai/sqlalchemy-to-pydantic#1 |
Beta Was this translation helpful? Give feedback.
-
@wezhai that requires sqlalchemy 2 🤔 |
Beta Was this translation helpful? Give feedback.
-
this make from_orm work again realazizk@4b1821c |
Beta Was this translation helpful? Give feedback.
-
Thanks for the patience with my reply! 😅 This would be a feature request. I deprecated this library a while ago in favor of SQLModel which would solve all the same use cases in a much better way, and I'm directing all the effort in that direction. SQLModel uses Pydantic models to define both data and table (SQL) models, so it's easier to do all these things. 🚀 Also, this library only supports SQLAlchemy 1.4.x, not 2.x. 🫠 |
Beta Was this translation helpful? Give feedback.
Thanks for the patience with my reply! 😅
This would be a feature request.
I deprecated this library a while ago in favor of SQLModel which would solve all the same use cases in a much better way, and I'm directing all the effort in that direction.
SQLModel uses Pydantic models to define both data and table (SQL) models, so it's easier to do all these things. 🚀
Also, this library only supports SQLAlchemy 1.4.x, not 2.x. 🫠