- Sort Score
- Num 10 results
- Language All
Results 561 - 570 of 795 for asyncId (0.07 seconds)
-
docs/zh/docs/tutorial/background-tasks.md
**FastAPI** 会创建一个 `BackgroundTasks` 类型的对象并作为该参数传入。 ## 创建一个任务函数 { #create-a-task-function } 创建要作为后台任务运行的函数。 它只是一个可以接收参数的标准函数。 它可以是 `async def` 或普通的 `def` 函数,**FastAPI** 知道如何正确处理。 在这种情况下,任务函数将写入一个文件(模拟发送电子邮件)。 由于写操作不使用 `async` 和 `await`,我们用普通的 `def` 定义函数: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[6:9] *} ## 添加后台任务 { #add-the-background-task }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 4.1K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/base/login/FessLoginAssist.java
import org.codelibs.fess.sso.SsoAuthenticator; import org.codelibs.fess.util.ComponentUtil; import org.dbflute.optional.OptionalEntity; import org.dbflute.optional.OptionalThing; import org.lastaflute.core.magic.async.AsyncManager; import org.lastaflute.core.time.TimeManager; import org.lastaflute.web.login.LoginHandlingResource; import org.lastaflute.web.login.PrimaryLoginManager; import org.lastaflute.web.login.TypicalLoginAssist;
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Jul 17 08:28:31 GMT 2025 - 12.1K bytes - Click Count (0) -
architecture/standards/0001-use-architectural-decision-records.md
* They are rarely updated after creation and initial review, and then become hard to follow, especially after important decisions are made * They are not synced with the code to reflect the eventual solution that is committed * Google Docs is not a "code-oriented" tool, like Markdown can be * Review in Google Docs is not as simple as a PR code review in GitHub ## Decision
Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Thu Mar 05 12:39:41 GMT 2026 - 2.9K bytes - Click Count (0) -
docs_src/additional_responses/tutorial002_py310.py
@app.get( "/items/{item_id}", response_model=Item, responses={ 200: { "content": {"image/png": {}}, "description": "Return the JSON item or an image.", } }, ) async def read_item(item_id: str, img: bool | None = None): if img: return FileResponse("image.png", media_type="image/png") else:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 596 bytes - Click Count (0) -
docs_src/dependencies/tutorial003_py310.py
class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons=Depends(CommonQueryParams)): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit]Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 603 bytes - Click Count (0) -
docs_src/extra_data_types/tutorial001_an_py310.py
from datetime import datetime, time, timedelta from typing import Annotated from uuid import UUID from fastapi import Body, FastAPI app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: Annotated[datetime, Body()], end_datetime: Annotated[datetime, Body()], process_after: Annotated[timedelta, Body()], repeat_at: Annotated[time | None, Body()] = None, ):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 788 bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/InetAddressOrder.kt
import java.net.Inet6Address import java.net.InetAddress import okhttp3.internal.interleave /** * Implementation of HappyEyeballs Sorting Addresses. * * The current implementation does not address any of: * - Async DNS split by IP class * - Stateful handling of connectivity results * - The prioritisation of addresses * * https://datatracker.ietf.org/doc/html/rfc8305#section-4 */
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Apr 24 15:15:15 GMT 2025 - 1.3K bytes - Click Count (0) -
tests/test_allow_inf_nan_in_enforcing.py
from typing import Annotated import pytest from fastapi import Body, FastAPI, Query from fastapi.testclient import TestClient app = FastAPI() @app.post("/") async def get( x: Annotated[float, Query(allow_inf_nan=True)] = 0, y: Annotated[float, Query(allow_inf_nan=False)] = 0, z: Annotated[float, Query()] = 0, b: Annotated[float, Body(allow_inf_nan=False)] = 0, ) -> str: return "OK"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.8K bytes - Click Count (0) -
tests/test_security_oauth2_password_bearer_optional_description.py
app = FastAPI() oauth2_scheme = OAuth2PasswordBearer( tokenUrl="/token", description="OAuth2PasswordBearer security scheme", auto_error=False, ) @app.get("/items/") async def read_items(token: str | None = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token} client = TestClient(app) def test_no_token():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.4K bytes - Click Count (0) -
docs/de/docs/tutorial/background-tasks.md
Es handelt sich schlicht um eine Standard-Funktion, die Parameter empfangen kann. Es kann sich um eine `async def`- oder normale `def`-Funktion handeln. **FastAPI** weiß, wie damit zu verfahren ist. In diesem Fall schreibt die Taskfunktion in eine Datei (den Versand einer E-Mail simulierend). Und da der Schreibvorgang nicht `async` und `await` verwendet, definieren wir die Funktion mit normalem `def`:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 5.7K bytes - Click Count (0)