- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 127 for Model (0.15 sec)
-
docs/en/docs/advanced/additional-responses.md
## Additional Response with `model` You can pass to your *path operation decorators* a parameter `responses`. It receives a `dict`, the keys are status codes for each response, like `200`, and the values are other `dict`s with the information for each of them. Each of those response `dict`s can have a key `model`, containing a Pydantic model, just like `response_model`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 8.8K bytes - Viewed (0) -
docs/em/docs/tutorial/sql-databases.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 25.2K bytes - Viewed (1) -
docs/en/docs/how-to/separate-openapi-schemas.md
### Input Model in Docs You can confirm that in the docs, the `description` field doesn't have a **red asterisk**, it's not marked as required: <div class="screenshot"> <img src="/img/tutorial/separate-openapi-schemas/image01.png"> </div> ### Model for Output But if you use the same model as an output, like here: === "Python 3.10+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 6.7K bytes - Viewed (0) -
docs/ru/docs/tutorial/extra-models.md
{!> ../../../docs_src/extra_models/tutorial003.py!} ``` ### `Union` в Python 3.10 В этом примере мы передаём `Union[PlaneItem, CarItem]` в качестве значения аргумента `response_model`. Поскольку мы передаём его как **значение аргумента** вместо того, чтобы поместить его в **аннотацию типа**, нам придётся использовать `Union` даже в Python 3.10.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.6K bytes - Viewed (0) -
docs/de/docs/tutorial/body-updates.md
Wenn Sie Teil-Aktualisierungen entgegennehmen, ist der `exclude_unset`-Parameter in der `.model_dump()`-Methode von Pydantic-Modellen sehr nützlich. Wie in `item.model_dump(exclude_unset=True)`. !!! info In Pydantic v1 hieß diese Methode `.dict()`, in Pydantic v2 wurde sie deprecated (aber immer noch unterstützt) und in `.model_dump()` umbenannt.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:26:37 GMT 2024 - 6.5K bytes - Viewed (0) -
docs/en/docs/advanced/openapi-callbacks.md
Temporarily adopting this point of view (of the *external developer*) can help you feel like it's more obvious where to put the parameters, the Pydantic model for the body, for the response, etc. for that *external API*. ### Create a callback `APIRouter` First create a new `APIRouter` that will contain one or more callbacks. ```Python hl_lines="3 25"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 7.7K bytes - Viewed (0) -
docs/en/docs/tutorial/body.md
{!> ../../../docs_src/body/tutorial001_py310.py!} ``` === "Python 3.8+" ```Python hl_lines="4" {!> ../../../docs_src/body/tutorial001.py!} ``` ## Create your data model Then you declare your data model as a class that inherits from `BaseModel`. Use standard Python types for all the attributes: === "Python 3.10+" ```Python hl_lines="5-9" {!> ../../../docs_src/body/tutorial001_py310.py!}
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 7.3K bytes - Viewed (0) -
docs/en/docs/advanced/path-operation-advanced-configuration.md
``` !!! info In Pydantic version 1 the method to get the JSON Schema for a model was called `Item.schema()`, in Pydantic version 2, the method is called `Item.model_json_schema()`. Nevertheless, although we are not using the default integrated functionality, we are still using a Pydantic model to manually generate the JSON Schema for the data that we want to receive in YAML.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.7K bytes - Viewed (0) -
docs/en/docs/advanced/response-change-status-code.md
And if you declared a `response_model`, it will still be used to filter and convert the object you returned. **FastAPI** will use that *temporal* response to extract the status code (also cookies and headers), and will put them in the final response that contains the value you returned, filtered by any `response_model`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 1.5K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
You could load it at the top level of the module/file, but that would also mean that it would **load the model** even if you are just running a simple automated test, then that test would be **slow** because it would have to wait for the model to load before being able to run an independent part of the code.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.8K bytes - Viewed (0)