Created
March 14, 2022 19:38
-
-
Save pmbrull/972152063fbc469615b8847e6e8d437b to your computer and use it in GitHub Desktop.
How to make the most of Pydantic 04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unnecessary_data = { | |
"name": "Lévy", | |
"age": 3, | |
"key": "value", # unnecessary | |
"key2": "value2", # unnecessary x2 | |
"address": { | |
"city": "Wonderland", | |
"zip_code": "ABCDE", | |
"number": 123 | |
} | |
} | |
data = CatRequest.parse_obj(unnecessary_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment