- Sort Score
- Result 10 results
- Languages All
Results 1681 - 1690 of 1,962 for fastapi (0.06 sec)
-
tests/test_jsonable_encoder.py
from datetime import datetime, timezone from decimal import Decimal from enum import Enum from pathlib import PurePath, PurePosixPath, PureWindowsPath from typing import Optional import pytest from fastapi._compat import PYDANTIC_V2, Undefined from fastapi.encoders import jsonable_encoder from pydantic import BaseModel, Field, ValidationError from .utils import needs_pydanticv1, needs_pydanticv2 class Person:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 9K bytes - Viewed (0) -
docs/zh/docs/tutorial/metadata.md
# 元数据和文档 URL 你可以在 FastAPI 应用程序中自定义多个元数据配置。 ## API 元数据 你可以在设置 OpenAPI 规范和自动 API 文档 UI 中使用的以下字段: | 参数 | 类型 | 描述 | |------------|------|-------------| | `title` | `str` | API 的标题。 | | `summary` | `str` | API 的简短摘要。 <small>自 OpenAPI 3.1.0、FastAPI 0.99.0 起可用。.</small> | | `description` | `str` | API 的简短描述。可以使用Markdown。 | | `version` | `string` | API 的版本。这是您自己的应用程序的版本,而不是 OpenAPI 的版本。例如 `2.5.0` 。 |
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.6K bytes - Viewed (0) -
docs/de/docs/tutorial/body-fields.md
/// ```Python hl_lines="4" {!> ../../docs_src/body_fields/tutorial001.py!} ``` //// /// warning | "Achtung" Beachten Sie, dass `Field` direkt von `pydantic` importiert wird, nicht von `fastapi`, wie die anderen (`Query`, `Path`, `Body`, usw.) /// ## Modellattribute deklarieren Dann können Sie `Field` mit Modellattributen deklarieren: //// tab | Python 3.10+ ```Python hl_lines="11-14"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.9K bytes - Viewed (0) -
docs/pt/docs/tutorial/middleware.md
# Middleware Você pode adicionar middleware à suas aplicações **FastAPI**. Um "middleware" é uma função que manipula cada **requisição** antes de ser processada por qualquer *operação de rota* específica. E também cada **resposta** antes de retorná-la. * Ele pega cada **requisição** que chega ao seu aplicativo. * Ele pode então fazer algo com essa **requisição** ou executar qualquer código necessário.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002_an.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.request_files.tutorial002_an import app client = TestClient(app) def test_post_form_no_body(): response = client.post("/files/") assert response.status_code == 422, response.text assert response.json() == IsDict( { "detail": [ { "type": "missing",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.5K bytes - Viewed (0) -
tests/test_tutorial/test_dataclasses/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.dataclasses.tutorial003 import app from ...utils import needs_pydanticv1, needs_pydanticv2 client = TestClient(app) def test_post_authors_item(): response = client.post( "/authors/foo/items/", json=[{"name": "Bar"}, {"name": "Baz", "description": "Drop the Baz"}], ) assert response.status_code == 200 assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Jul 31 14:09:15 UTC 2024 - 12.1K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial003 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 4.5K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial009_py39.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.body_nested_models.tutorial009_py39 import app client = TestClient(app) return client @needs_py39 def test_post_body(client: TestClient): data = {"2": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4.3K bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/global-dependencies.md
# 🌐 🔗 🆎 🈸 👆 💪 💚 🚮 🔗 🎂 🈸. 🎏 🌌 👆 💪 [🚮 `dependencies` *➡ 🛠️ 👨🎨*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank}, 👆 💪 🚮 👫 `FastAPI` 🈸. 👈 💼, 👫 🔜 ✔ 🌐 *➡ 🛠️* 🈸: ```Python hl_lines="15" {!../../docs_src/dependencies/tutorial012.py!} ``` & 🌐 💭 📄 🔃 [❎ `dependencies` *➡ 🛠️ 👨🎨*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank} ✔, ✋️ 👉 💼, 🌐 *➡ 🛠️* 📱.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 825 bytes - Viewed (0) -
docs/pt/docs/tutorial/metadata.md
## Metadados para API Você pode definir os seguintes campos que são usados na especificação OpenAPI e nas interfaces automáticas de documentação da API: | Parâmetro | Tipo | Descrição | |------------|------|-------------| | `title` | `str` | O título da API. | | `summary` | `str` | Um breve resumo da API. <small>Disponível desde OpenAPI 3.1.0, FastAPI 0.99.0.</small> |
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 29 10:36:14 UTC 2024 - 6.1K bytes - Viewed (0)