- Sort Score
- Num 10 results
- Language All
Results 141 - 150 of 788 for Resync (0.07 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/response_model/tutorial001_01_py39.py
name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: list[str] = [] @app.post("/items/") async def create_item(item: Item) -> Item: return item @app.get("/items/") async def read_items() -> list[Item]: return [ Item(name="Portal Gun", price=42.0), Item(name="Plumbus", price=32.0),Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 507 bytes - Click Count (0) -
docs_src/metadata/tutorial004_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 693 bytes - Click Count (0) -
tests/test_route_scope.py
from fastapi.testclient import TestClient app = FastAPI() @app.get("/users/{user_id}") async def get_user(user_id: str, request: Request): route: APIRoute = request.scope["route"] return {"user_id": user_id, "path": route.path} @app.websocket("/items/{item_id}") async def websocket_item(item_id: str, websocket: WebSocket): route: APIWebSocketRoute = websocket.scope["route"]
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.5K bytes - Click Count (0) -
docs/ru/docs/advanced/dataclasses.md
8. Обратите внимание, что эта *функция-обработчик пути* использует обычный `def` вместо `async def`. Как и всегда в FastAPI, вы можете сочетать `def` и `async def` по необходимости. Если хотите освежить в памяти, когда что использовать, посмотрите раздел _"Нет времени?"_ в документации про [`async` и `await`](../async.md#in-a-hurry){.internal-link target=_blank}.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 6.6K bytes - Click Count (0) -
docs/en/docs/tutorial/request-files.md
* This is especially useful if you run `await myfile.read()` once and then need to read the contents again. * `close()`: Closes the file. As all these methods are `async` methods, you need to "await" them. For example, inside of an `async` *path operation function* you can get the contents with: ```Python contents = await myfile.read() ```
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 09:15:41 GMT 2025 - 7.3K bytes - Click Count (0) -
docs_src/custom_request_and_route/tutorial002_an_py39.py
from fastapi.routing import APIRoute class ValidationErrorLoggingRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: try: return await original_route_handler(request) except RequestValidationError as exc: body = await request.body()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 947 bytes - Click Count (0) -
docs_src/custom_request_and_route/tutorial002_py310.py
from fastapi.routing import APIRoute class ValidationErrorLoggingRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: try: return await original_route_handler(request) except RequestValidationError as exc: body = await request.body()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 935 bytes - Click Count (0) -
docs_src/security/tutorial003_an_py310.py
return user async def get_current_user(token: Annotated[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 async def get_current_active_user(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.5K bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial002_py310.py
tags: set[str] = set() @app.post("/items/", response_model=Item, tags=["items"]) async def create_item(item: Item): return item @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}] @app.get("/users/", tags=["users"]) async def read_users():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 537 bytes - Click Count (0) -
docs_src/response_model/tutorial006_py39.py
} @app.get( "/items/{item_id}/name", response_model=Item, response_model_include=["name", "description"], ) async def read_item_name(item_id: str): return items[item_id] @app.get("/items/{item_id}/public", response_model=Item, response_model_exclude=["tax"]) async def read_item_public_data(item_id: str):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 848 bytes - Click Count (0)