- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for shortcut (0.14 sec)
-
docs/en/docs/tutorial/response-model.md
They take a `set` of `str` with the name of the attributes to include (omitting the rest) or to exclude (including the rest). This can be used as a quick shortcut if you have only one Pydantic model and want to remove some data from the output. !!! tip But it is still recommended to use the ideas above, using multiple classes, instead of these parameters.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17.9K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.4K bytes - Viewed (0) -
docs/en/docs/python-types.md
Using `Optional[str]` instead of just `str` will let the editor help you detecting errors where you could be assuming that a value is always a `str`, when it could actually be `None` too. `Optional[Something]` is actually a shortcut for `Union[Something, None]`, they are equivalent. This also means that in Python 3.10, you can use `Something | None`: === "Python 3.10+" ```Python hl_lines="1"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17K bytes - Viewed (0)