- Sort Score
- Num 10 results
- Language All
Results 101 - 110 of 883 for Fsync (0.02 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/bigger_applications/app_an_py310/routers/items.py
responses={404: {"description": "Not found"}}, ) fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}} @router.get("/") async def read_items(): return fake_items_db @router.get("/{item_id}") async def read_item(item_id: str): if item_id not in fake_items_db: raise HTTPException(status_code=404, detail="Item not found")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1011 bytes - Click Count (0) -
docs_src/custom_request_and_route/tutorial003_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 1K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/references/streaming.md
# Streaming ## Stream JSON Lines To stream JSON Lines, declare the return type and use `yield` to return the data. ```python @app.get("/items/stream") async def stream_items() -> AsyncIterable[Item]: for item in items: yield item ``` ## Server-Sent Events (SSE) To stream Server-Sent Events, use `response_class=EventSourceResponse` and `yield` items from the endpoint.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 2.5K bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/index.md
## To `async` or not to `async` { #to-async-or-not-to-async } As dependencies will also be called by **FastAPI** (the same as your *path operation functions*), the same rules apply while defining your functions. You can use `async def` or normal `def`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 9.5K bytes - Click Count (0) -
docs/tr/docs/advanced/events.md
Dikkat edilmesi gereken ilk şey, `yield` içeren async bir fonksiyon tanımlıyor olmamız. Bu, `yield` kullanan Dependencies’e oldukça benzer. {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} Fonksiyonun `yield`’den önceki kısmı, uygulama başlamadan **önce** çalışır. `yield`’den sonraki kısım ise, uygulama işini bitirdikten **sonra** çalışır. ### Async Context Manager { #async-context-manager }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 8.3K bytes - Click Count (0) -
docs_src/security/tutorial003_py310.py
return user async def get_current_user(token: str = Depends(oauth2_scheme)): user = fake_decode_token(token) if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Not authenticated", headers={"WWW-Authenticate": "Bearer"}, ) return user
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.4K bytes - Click Count (0) -
docs_src/dependency_testing/tutorial001_an_py310.py
app = FastAPI() async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.5K bytes - Click Count (0) -
fastapi/routing.py
async def app(scope: Scope, receive: Receive, send: Send) -> None: session = WebSocket(scope, receive=receive, send=send) async def app(scope: Scope, receive: Receive, send: Send) -> None: async with AsyncExitStack() as request_stack: scope["fastapi_inner_astack"] = request_stack async with AsyncExitStack() as function_stack:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 193K bytes - Click Count (0) -
docs_src/dependencies/tutorial001_py310.py
from fastapi import Depends, FastAPI app = FastAPI() async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return commons @app.get("/users/") async def read_users(commons: dict = Depends(common_parameters)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 404 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial006_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}] @app.get("/users/", tags=["users"]) async def read_users(): return [{"username": "johndoe"}] @app.get("/elements/", tags=["items"], deprecated=True) async def read_elements():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 365 bytes - Click Count (0)