Fast API Tutorial, Part 14: Extra Models

Publié le: 02 juin 2022
sur la chaîne: JVP Design
5,969
105

The content in this video has been seen in an earlier video but is still worth discussing itself. When you're building an API it may be useful to have descriptive models that are similar, but not used for the same things. For example, your BaseUser model may have a username, email, and date of birth and your UserInDB model may have all of these fields but also a `hashed_password` field. Your UserIn model may have a plain text password. Your UserOut model may have only the fields described in your BaseUser model.

In this video you'll see a basic introduction about how to incorporate this sort of model inheritance.

GitHub: https://github.com/jvp-design/fastapi...


Sur cette page du site, vous pouvez voir la vidéo en ligne Fast API Tutorial, Part 14: Extra Models durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur JVP Design 02 juin 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 5,969 fois et il a aimé 105 téléspectateurs. Bon visionnage!