Pydantic Integration for edgedb-python #4050
ngriffiths13
started this conversation in
Ideas
Replies: 1 comment
-
One piece of background: agritheory/edgewise#12 At the EdgeDB 1.0 release party, the team took a pretty strong position of "ORM bad" because performance, not related to ease-of-use or cross-compatibility. I kind of agree, but only in a a "don't build it in" perspective; not in a "you shouldn't ever do that" perspective. Personally, I have a low opinion of pydantic. If it's something you really want, I hope my abandoned attempt will help. I don't have the bandwidth to maintain it, but it has a lot of ideas I'm proud of, practical or not. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It seems like there is a really strong use case for building some integrations between edgedb-python and pydantic. Are there plans to do this? Or is there some best practice way to do this already? I currently write my edgedb schema, and then just copy those same schemas into pydantic models. After pulling data I just build pydantic models out of that. It would be cool if at the least we could get pydantic models from data pulls, if not generate pydantic models from the edgedb schema.
For example the new psycopg3 library supports pulling data into pydantic models https://www.psycopg.org/psycopg3/docs/advanced/typing.html#example-returning-records-as-pydantic-models.
Just curious if this has been thought about or considered? I would be willing to work on something like this if there was interest in having it.
Beta Was this translation helpful? Give feedback.
All reactions