- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for parse_obj (0.09 sec)
-
docs_src/path_operation_advanced_configuration/tutorial007_pv1.py
raw_body = await request.body() try: data = yaml.safe_load(raw_body) except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML") try: item = Item.parse_obj(data) except ValidationError as e: raise HTTPException(status_code=422, detail=e.errors())
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 789 bytes - Viewed (0) -
docs/en/docs/advanced/path-operation-advanced-configuration.md
```Python hl_lines="26-33" {!> ../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} ``` //// /// info In Pydantic version 1 the method to parse and validate an object was `Item.parse_obj()`, in Pydantic version 2, the method is called `Item.model_validate()`. /// /// tip Here we reuse the same Pydantic model. But the same way, we could have validated it in some other way.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.6K bytes - Viewed (0) -
docs/de/docs/advanced/path-operation-advanced-configuration.md
```Python hl_lines="26-33" {!> ../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!} ``` //// /// info In Pydantic Version 1 war die Methode zum Parsen und Validieren eines Objekts `Item.parse_obj()`, in Pydantic Version 2 heißt die Methode `Item.model_validate()`. /// /// tip | "Tipp" Hier verwenden wir dasselbe Pydantic-Modell wieder.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.5K bytes - Viewed (0)