- Sort Score
- Result 10 results
- Languages All
Results 541 - 550 of 1,992 for Fastapi (0.04 sec)
-
tests/test_validate_response_recursive/app.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class RecursiveItem(BaseModel): sub_items: list["RecursiveItem"] = [] name: str class RecursiveSubitemInSubmodel(BaseModel): sub_items2: list["RecursiveItemViaSubmodel"] = [] name: str class RecursiveItemViaSubmodel(BaseModel): sub_items1: list[RecursiveSubitemInSubmodel] = [] name: str
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 1.1K bytes - Viewed (0) -
docs/ru/docs/advanced/openapi-webhooks.md
## Документирование вебхуков с помощью FastAPI и OpenAPI { #documenting-webhooks-with-fastapi-and-openapi }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.9K bytes - Viewed (0) -
tests/test_no_swagger_ui_redirect.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI(swagger_ui_oauth2_redirect_url=None) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert response.headers["content-type"] == "text/html; charset=utf-8"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Apr 08 04:37:38 UTC 2020 - 786 bytes - Viewed (0) -
tests/test_optional_file_list.py
from typing import Optional from fastapi import FastAPI, File from fastapi.testclient import TestClient app = FastAPI() @app.post("/files") async def upload_files(files: Optional[list[bytes]] = File(None)): if files is None: return {"files_count": 0} return {"files_count": len(files), "sizes": [len(f) for f in files]} def test_optional_bytes_list(): client = TestClient(app) response = client.post(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 821 bytes - Viewed (0) -
fastapi/param_functions.py
[FastAPI docs for Security](https://fastapi.tiangolo.com/tutorial/security/) and in the [FastAPI docs for OAuth2 scopes](https://fastapi.tiangolo.com/advanced/security/oauth2-scopes/). **Example** ```python from typing import Annotated from fastapi import Security, FastAPI from .db import User from .security import get_current_active_user app = FastAPI()Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 63K bytes - Viewed (0) -
docs/en/docs/how-to/testing-database.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 540 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial001_py39.py
from typing import Union from fastapi import FastAPI, Path from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int = Path(title="The ID of the item to get", ge=0, le=1000), q: Union[str, None] = None,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 596 bytes - Viewed (0) -
docs_src/dependencies/tutorial012_py39.py
from fastapi import Depends, FastAPI, Header, HTTPException async def verify_token(x_token: str = Header()): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: str = Header()): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 696 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial007_pv1_py39.py
import yaml from fastapi import FastAPI, HTTPException, Request from pydantic.v1 import BaseModel, ValidationError app = FastAPI() class Item(BaseModel): name: str tags: list[str] @app.post( "/items/", openapi_extra={ "requestBody": { "content": {"application/x-yaml": {"schema": Item.schema()}}, "required": True, }, }, )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 767 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial007_py39.py
import yaml from fastapi import FastAPI, HTTPException, Request from pydantic import BaseModel, ValidationError app = FastAPI() class Item(BaseModel): name: str tags: list[str] @app.post( "/items/", openapi_extra={ "requestBody": { "content": {"application/x-yaml": {"schema": Item.model_json_schema()}}, "required": True, }, }, )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 797 bytes - Viewed (0)