- Sort Score
- Num 10 results
- Language All
Results 701 - 710 of 1,916 for FastApi (0.05 seconds)
-
tests/test_validation_error_context.py
from fastapi import FastAPI, Request, WebSocket from fastapi.exceptions import ( RequestValidationError, ResponseValidationError, WebSocketRequestValidationError, ) from fastapi.testclient import TestClient from pydantic import BaseModel class Item(BaseModel): id: int name: str class ExceptionCapture: def __init__(self): self.exception = None def capture(self, exc):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 06 12:21:57 GMT 2025 - 4.7K bytes - Click Count (0) -
docs_src/settings/app02_an_py39/main.py
from functools import lru_cache from typing import Annotated from fastapi import Depends, FastAPI from .config import Settings app = FastAPI() @lru_cache def get_settings(): return Settings() @app.get("/info") async def info(settings: Annotated[Settings, Depends(get_settings)]): return { "app_name": settings.app_name, "admin_email": settings.admin_email,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 445 bytes - Click Count (0) -
docs_src/header_param_models/tutorial001_an_py310.py
from typing import Annotated from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: str | None = None traceparent: str | None = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: Annotated[CommonHeaders, Header()]):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 392 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial001_py310.py
from fastapi import FastAPI, status from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", response_model=Item, status_code=status.HTTP_201_CREATED) async def create_item(item: Item):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 363 bytes - Click Count (0) -
docs_src/behind_a_proxy/tutorial004_py39.py
from fastapi import FastAPI, Request app = FastAPI( servers=[ {"url": "https://stag.example.com", "description": "Staging environment"}, {"url": "https://prod.example.com", "description": "Production environment"}, ], root_path="/api/v1", root_path_in_servers=False, ) @app.get("/app") def read_main(request: Request):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 437 bytes - Click Count (0) -
docs/ja/docs/features.md
* 本番アプリケーションで使用されます ## Starletteの機能 **FastAPI**は、<a href="https://www.starlette.dev/" class="external-link" target="_blank"><strong>Starlette </strong></a>と完全に互換性があります(そしてベースになっています)。したがって、追加のStarletteコードがあれば、それも機能します。 `FastAPI`は実際には`Starlette`のサブクラスです。したがって、Starletteをすでに知っているか使用している場合は、ほとんどの機能が同じように機能します。 **FastAPI**を使用すると、以下のような、**Starlette**のすべての機能を利用できます(FastAPIはStarletteを強化したものにすぎないため):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 12.2K bytes - Click Count (0) -
docs/ru/docs/tutorial/request-form-models.md
/// note | Заметка Этот функционал доступен начиная с версии FastAPI `0.113.0`. 🤓 /// ## Pydantic-модели для форм { #pydantic-models-for-forms } Вам просто нужно объявить **Pydantic-модель** с полями, которые вы хотите получить как **поля формы**, а затем объявить параметр как `Form`: {* ../../docs_src/request_form_models/tutorial001_an_py39.py hl[9:11,15] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:24:39 GMT 2025 - 3.4K bytes - Click Count (0) -
docs/fr/docs/advanced/additional-responses.md
/// info À moins que vous ne spécifiiez explicitement un type de média différent dans votre paramètre `responses`, FastAPI supposera que la réponse a le même type de média que la classe de réponse principale (par défaut `application/json`). Mais si vous avez spécifié une classe de réponse personnalisée avec `None` comme type de média, FastAPI utilisera `application/json` pour toute réponse supplémentaire associée à un modèle. ///
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Nov 09 16:39:20 GMT 2024 - 9.5K bytes - Click Count (0) -
tests/test_custom_schema_fields.py
from typing import Annotated, Optional from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel, WithJsonSchema app = FastAPI() class Item(BaseModel): name: str description: Annotated[ Optional[str], WithJsonSchema({"type": ["string", "null"]}) ] = None model_config = { "json_schema_extra": { "x-something-internal": {"level": 4},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 1.3K bytes - Click Count (0) -
docs/fr/docs/tutorial/query-params.md
/// check | Remarque On peut voir que **FastAPI** est capable de détecter que le paramètre de chemin `item_id` est un paramètre de chemin et que `q` n'en est pas un, c'est donc un paramètre de requête. /// /// note **FastAPI** saura que `q` est optionnel grâce au `=None`.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Nov 09 16:39:20 GMT 2024 - 5.6K bytes - Click Count (0)