- Sort Score
- Result 10 results
- Languages All
Results 1401 - 1410 of 1,992 for Fastapi (0.04 sec)
-
tests/test_tutorial/test_handling_errors/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial002_py39 import app client = TestClient(app) def test_get_item_header(): response = client.get("/items-header/foo") assert response.status_code == 200, response.text assert response.json() == {"item": "The Foo Wrestlers"} def test_get_item_not_found_header(): response = client.get("/items-header/bar")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.3K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial004_py39 import app client = TestClient(app) def test_get_validation_error(): response = client.get("/items/foo") assert response.status_code == 400, response.text assert "Validation errors:" in response.text assert "Field: ('path', 'item_id')" in response.text def test_get_http_error(): response = client.get("/items/3")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.4K bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_app01.py
import importlib import sys import pytest from dirty_equals import IsAnyStr from fastapi.testclient import TestClient from pydantic import ValidationError from pytest import MonkeyPatch @pytest.fixture( name="mod_name", params=[ pytest.param("app01_py39"), ], ) def get_mod_name(request: pytest.FixtureRequest): return f"docs_src.settings.{request.param}.main" @pytest.fixture(name="client")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/es/docs/tutorial/cookie-param-models.md
Esto te permitirá **reutilizar el modelo** en **múltiples lugares** y también declarar validaciones y metadatos para todos los parámetros a la vez. 😎 /// note | Nota Esto es compatible desde la versión `0.115.0` de FastAPI. 🤓 /// /// tip | Consejo Esta misma técnica se aplica a `Query`, `Cookie`, y `Header`. 😎 /// ## Cookies con un Modelo de Pydantic { #cookies-with-a-pydantic-model }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 3.3K bytes - Viewed (0) -
docs/ru/docs/how-to/custom-docs-ui-assets.md
Чтобы отключить её, установите их URL в значение `None` при создании вашего приложения `FastAPI`: {* ../../docs_src/custom_docs_ui/tutorial001_py39.py hl[8] *} ### Подключить пользовательскую документацию { #include-the-custom-docs } Теперь вы можете создать *операции пути* для пользовательской документации. Вы можете переиспользовать внутренние функции FastAPI для создания HTML-страниц документации и передать им необходимые аргументы:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.8K bytes - Viewed (0) -
docs/ko/docs/advanced/additional-status-codes.md
/// /// note | 기술적 세부 정보 `from starlette.responses import JSONResponse`를 사용할 수도 있습니다. **FastAPI**는 개발자 여러분을 위한 편의성으로 `fastapi.responses`와 동일한 `starlette.responses`를 제공합니다. 그러나 사용 가능한 응답의 대부분은 Starlette에서 직접 제공됩니다. `status` 또한 마찬가지입니다. /// ## OpenAPI 및 API 문서 추가 상태 코드와 응답을 직접 반환하는 경우, FastAPI는 반환할 내용을 미리 알 수 있는 방법이 없기 때문에 OpenAPI 스키마(API 문서)에 포함되지 않습니다.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Dec 09 12:22:47 UTC 2024 - 2.1K bytes - Viewed (0) -
.github/labeler.yml
- all-globs-to-all-files: - '!fastapi/**' - '!pyproject.toml' - '!docs/en/data/sponsors.yml' - '!docs/en/overrides/main.html' lang-all: - all: - changed-files: - any-glob-to-any-file: - docs/*/docs/** - all-globs-to-all-files: - '!docs/en/docs/**' - '!docs/*/**/_*.md' - '!fastapi/**' - '!pyproject.toml' internal:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Nov 23 20:10:04 UTC 2025 - 921 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial004_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 712 bytes - Viewed (0) -
docs/ru/docs/how-to/custom-request-and-route.md
Например, если вы хотите прочитать или изменить тело запроса до того, как оно будет обработано вашим приложением. /// danger | Опасность Это «продвинутая» возможность. Если вы только начинаете работать с **FastAPI**, возможно, стоит пропустить этот раздел. /// ## Сценарии использования { #use-cases } Некоторые сценарии:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Dec 11 21:25:03 UTC 2025 - 7.2K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/sub-dependencies.md
# Sub-dependencies { #sub-dependencies } You can create dependencies that have **sub-dependencies**. They can be as **deep** as you need them to be. **FastAPI** will take care of solving them. ## First dependency "dependable" { #first-dependency-dependable } You could create a first dependency ("dependable") like: {* ../../docs_src/dependencies/tutorial005_an_py310.py hl[8:9] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.7K bytes - Viewed (0)