- Sort Score
- Result 10 results
- Languages All
Results 771 - 780 of 1,127 for def2 (0.1 sec)
-
docs_src/additional_status_codes/tutorial001_an.py
from typing_extensions import Annotated app = FastAPI() items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}} @app.put("/items/{item_id}") async def upsert_item( item_id: str, name: Annotated[Union[str, None], Body()] = None, size: Annotated[Union[int, None], Body()] = None, ): if item_id in items: item = items[item_id]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 734 bytes - Viewed (0) -
docs_src/app_testing/test_main.py
from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_read_main(): response = client.get("/") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 238 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial004_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query(min_length=3, max_length=50, pattern="^fixedquery$") ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 381 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial009_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[Union[str, None], Query(alias="item-query")] = None): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 356 bytes - Viewed (0) -
docs_src/response_model/tutorial002.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 350 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial004_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 317 bytes - Viewed (0) -
docs_src/request_forms/tutorial001_an.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 233 bytes - Viewed (0) -
docs_src/header_params/tutorial001.py
from typing import Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Union[str, None] = Header(default=None)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 214 bytes - Viewed (0) -
docs_src/request_form_models/tutorial001.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 05 15:16:50 UTC 2024 - 228 bytes - Viewed (0) -
docs_src/query_params/tutorial002_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 219 bytes - Viewed (0)