- Sort Score
- Num 10 results
- Language All
Results 381 - 390 of 795 for asyncId (0.05 seconds)
-
docs_src/path_operation_advanced_configuration/tutorial001_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", operation_id="some_specific_id_you_define") async def read_items():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 167 bytes - Click Count (0) -
docs_src/path_params/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 138 bytes - Click Count (0) -
docs_src/background_tasks/tutorial001_py310.py
with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 519 bytes - Click Count (0) -
docs_src/query_params/tutorial004_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/users/{user_id}/items/{item_id}") async def read_user_item( user_id: int, item_id: str, q: str | None = None, short: bool = False ): item = {"item_id": item_id, "owner_id": user_id} if q: item.update({"q": q}) if not short: item.update( {"description": "This is an amazing item that has a long description"} )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 436 bytes - Click Count (0) -
docs/zh/docs/index.md
``` <details markdown="1"> <summary>或者使用 <code>async def</code>...</summary> 如果你的代码里会用到 `async` / `await`,请使用 `async def`: ```Python hl_lines="7 12" from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") async def read_item(item_id: int, q: str | None = None):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 20.7K bytes - Click Count (0) -
docs_src/response_status_code/tutorial001_py310.py
from fastapi import FastAPI app = FastAPI() @app.post("/items/", status_code=201) async def create_item(name: str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 145 bytes - Click Count (0) -
docs_src/bigger_applications/app_an_py310/internal/admin.py
from fastapi import APIRouter router = APIRouter() @router.post("/") async def update_admin():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 147 bytes - Click Count (0) -
docs_src/query_param_models/tutorial002_an_py310.py
limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/") async def read_items(filter_query: Annotated[FilterParams, Query()]):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 483 bytes - Click Count (0) -
docs/de/docs/tutorial/dependencies/sub-dependencies.md
//// tab | Python 3.10+ ```Python hl_lines="1" async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.10+ nicht annotiert /// tip | Tipp Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 07:57:30 GMT 2026 - 4.5K bytes - Click Count (0) -
tests/test_tutorial/test_async_tests/test_main_a.py
import pytest from docs_src.async_tests.app_a_py310.test_main import test_root @pytest.mark.anyio async def test_async_testing():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 155 bytes - Click Count (0)