- Sort Score
- Num 10 results
- Language All
Results 351 - 360 of 707 for resync (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/dependencies/tutorial011_an_py310.py
def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/") async def read_query_check(fixed_content_included: Annotated[bool, Depends(checker)]):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 544 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) -
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) -
docs_src/extra_models/tutorial005_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/keyword-weights/", response_model=dict[str, float]) async def read_keyword_weights():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 180 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/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/ru/docs/tutorial/background-tasks.md
Это обычная функция, которая может принимать параметры. Это может быть как `async def`, так и обычная функция `def`, **FastAPI** знает, как корректно её выполнить. В этом случае функция задачи будет записывать данные в файл (имитируя отправку письма). Так как операция записи не использует `async` и `await`, мы определим функцию как обычную `def`: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[6:9] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 7.5K bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial002_py310.py
from fastapi import FastAPI from fastapi.routing import APIRoute app = FastAPI() @app.get("/items/") async def read_items(): return [{"item_id": "Foo"}] def use_route_names_as_operation_ids(app: FastAPI) -> None: """ Simplify operation IDs so that generated API clients have simpler function names. Should be called only after all routes have been added. """ for route in app.routes:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 572 bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial006_py310.py
"description": {"type": "string"}, }, } } }, "required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() data = magic_data_reader(raw_body)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1K bytes - Click Count (0)