- Sort Score
- Num 10 results
- Language All
Results 351 - 360 of 642 for tutorial009_py39 (0.14 seconds)
-
docs/en/docs/tutorial/extra-models.md
The same way, you can declare responses of lists of objects. For that, use the standard Python `typing.List` (or just `list` in Python 3.9 and above): {* ../../docs_src/extra_models/tutorial004_py39.py hl[18] *} ## Response with arbitrary `dict` { #response-with-arbitrary-dict }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 6.9K bytes - Click Count (0) -
docs/pt/docs/tutorial/path-params-numeric-validations.md
Então, você pode declarar sua função assim: {* ../../docs_src/path_params_numeric_validations/tutorial002_py39.py hl[7] *} Mas tenha em mente que, se você usar `Annotated`, você não terá esse problema, não fará diferença, pois você não está usando valores padrão de parâmetros de função para `Query()` ou `Path()`.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 6.7K bytes - Click Count (0) -
docs/pt/docs/tutorial/extra-models.md
Da mesma forma, você pode declarar respostas de listas de objetos. Para isso, use o padrão Python `typing.List` (ou simplesmente `list` no Python 3.9 e superior): {* ../../docs_src/extra_models/tutorial004_py39.py hl[18] *} ## Resposta com `dict` arbitrário { #response-with-arbitrary-dict }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 7.5K bytes - Click Count (0) -
docs/zh/docs/tutorial/extra-models.md
使用同样的方式也可以声明由对象列表构成的响应。 为此,请使用标准的 Python `typing.List`: {* ../../docs_src/extra_models/tutorial004_py39.py hl[18] *} ## 任意 `dict` 构成的响应 任意的 `dict` 都能用于声明响应,只要声明键和值的类型,无需使用 Pydantic 模型。 事先不知道可用的字段 / 属性名时(Pydantic 模型必须知道字段是什么),这种方式特别有用。 此时,可以使用 `typing.Dict`: {* ../../docs_src/extra_models/tutorial005_py39.py hl[6] *} ## 小结 针对不同场景,可以随意使用不同的 Pydantic 模型继承定义的基类。Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 5.7K bytes - Click Count (0) -
tests/test_tutorial/test_custom_response/test_tutorial008.py
from pathlib import Path from fastapi.testclient import TestClient from docs_src.custom_response import tutorial008_py39 from docs_src.custom_response.tutorial008_py39 import app client = TestClient(app) def test_get(tmp_path: Path): file_path: Path = tmp_path / "large-video-file.mp4" tutorial008_py39.some_file_path = str(file_path) test_content = b"Fake video bytes" file_path.write_bytes(test_content)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 502 bytes - Click Count (0) -
docs/pt/docs/how-to/extending-openapi.md
Primeiro, escreva toda a sua aplicação **FastAPI** normalmente: {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[1,4,7:9] *} ### Gerar o esquema OpenAPI { #generate-the-openapi-schema } Em seguida, use a mesma função utilitária para gerar o esquema OpenAPI, dentro de uma função `custom_openapi()`: {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[2,15:21] *} ### Modificar o esquema OpenAPI { #modify-the-openapi-schema }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 3.6K bytes - Click Count (0) -
tests/test_tutorial/test_custom_response/test_tutorial009b.py
from pathlib import Path from fastapi.testclient import TestClient from docs_src.custom_response import tutorial009b_py39 from docs_src.custom_response.tutorial009b_py39 import app client = TestClient(app) def test_get(tmp_path: Path): file_path: Path = tmp_path / "large-video-file.mp4" tutorial009b_py39.some_file_path = str(file_path) test_content = b"Fake video bytes" file_path.write_bytes(test_content)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 505 bytes - Click Count (0) -
docs/ru/docs/how-to/extending-openapi.md
Сначала напишите приложение **FastAPI** как обычно: {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[1,4,7:9] *} ### Сгенерируйте схему OpenAPI { #generate-the-openapi-schema } Затем используйте ту же вспомогательную функцию для генерации схемы OpenAPI внутри функции `custom_openapi()`: {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[2,15:21] *} ### Измените схему OpenAPI { #modify-the-openapi-schema }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 4.9K bytes - Click Count (0) -
docs/ko/docs/tutorial/extra-models.md
{* ../../docs_src/extra_models/tutorial004_py39.py hl[18] *} ## 임의의 `dict` 응답 Pydantic 모델을 사용하지 않고, 키와 값의 타입만 선언하여 평범한 임의의 `dict`로 응답을 선언할 수도 있습니다. 이는 Pydantic 모델에 필요한 유효한 필드/속성 이름을 사전에 알 수 없는 경우에 유용합니다. 이 경우, `typing.Dict`를 사용할 수 있습니다(또는 Python 3.9 이상에서는 단순히 `dict`를 사용할 수 있습니다): {* ../../docs_src/extra_models/tutorial005_py39.py hl[6] *} ## 요약Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri May 30 13:38:33 GMT 2025 - 8.4K bytes - Click Count (0) -
docs/es/docs/how-to/extending-openapi.md
{* ../../docs_src/extending_openapi/tutorial001_py39.py hl[1,4,7:9] *} ### Generar el esquema de OpenAPI { #generate-the-openapi-schema } Luego, usa la misma función de utilidad para generar el esquema de OpenAPI, dentro de una función `custom_openapi()`: {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[2,15:21] *} ### Modificar el esquema de OpenAPI { #modify-the-openapi-schema }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 3.6K bytes - Click Count (0)