- Sort Score
- Num 10 results
- Language All
Results 541 - 550 of 795 for asyncId (0.06 seconds)
-
docs_src/handling_errors/tutorial002_py310.py
from fastapi import FastAPI, HTTPException app = FastAPI() items = {"foo": "The Foo Wrestlers"} @app.get("/items-header/{item_id}") async def read_item_header(item_id: str): if item_id not in items: raise HTTPException( status_code=404, detail="Item not found", headers={"X-Error": "There goes my error"}, )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 404 bytes - Click Count (0) -
docs_src/pydantic_v1_in_v2/tutorial004_an_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Oct 11 16:45:54 GMT 2025 - 360 bytes - Click Count (0) -
docs_src/header_param_models/tutorial002_an_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 432 bytes - Click Count (0) -
docs_src/query_params/tutorial003_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id: str, q: str | None = None, short: bool = False): item = {"item_id": item_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 - 374 bytes - Click Count (0) -
docs/en/docs/index.md
``` <details markdown="1"> <summary>Or use <code>async def</code>...</summary> If your code uses `async` / `await`, use `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: Sat Mar 07 09:29:03 GMT 2026 - 21.4K bytes - Click Count (0) -
docs_src/path_params_numeric_validations/tutorial001_an_py310.py
from typing import Annotated from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( item_id: Annotated[int, Path(title="The ID of the item to get")], q: Annotated[str | None, Query(alias="item-query")] = None, ): results = {"item_id": item_id} if q: results.update({"q": q})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 375 bytes - Click Count (0) -
docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py
size: float class ItemV2(BaseModelV2): name: str description: str | None = None size: float app = FastAPI() @app.post("/items/", response_model=ItemV2) async def create_item(item: Item):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Oct 11 16:45:54 GMT 2025 - 407 bytes - Click Count (0) -
docs_src/query_param_models/tutorial001_py310.py
class FilterParams(BaseModel): 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: FilterParams = Query()):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 422 bytes - Click Count (0) -
docs_src/server_sent_events/tutorial003_py310.py
from collections.abc import AsyncIterable from fastapi import FastAPI from fastapi.sse import EventSourceResponse, ServerSentEvent app = FastAPI() @app.get("/logs/stream", response_class=EventSourceResponse) async def stream_logs() -> AsyncIterable[ServerSentEvent]: logs = [ "2025-01-01 INFO Application started", "2025-01-01 DEBUG Connected to database", "2025-01-01 WARN High memory usage detected", ]
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 518 bytes - Click Count (0) -
guava-gwt/src-super/com/google/common/escape/super/com/google/common/escape/Platform.java
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Jan 18 02:54:30 GMT 2025 - 1.1K bytes - Click Count (0)