Skip to content
Discussion options

You must be logged in to vote

Thanks for the help @Kludex ! 🙇 ☕

@lvar you would need a Pydantic model for each SQLAlchemy model, alone, without relationships. You could use pydantic-sqlalchemy for that as @Kludex mentions.

Then you could probably create subclasses of those Pydantic models adding the relationships that you want to show.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tiangolo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
Converted from issue

This discussion was converted from issue #1803 on February 28, 2023 01:13.