- Sort Score
- Num 10 results
- Language All
Results 131 - 140 of 880 for resync (0.07 seconds)
-
docs_src/dependencies/tutorial008_an_py310.py
from typing import Annotated from fastapi import Depends async def dependency_a(): dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 521 bytes - Click Count (0) -
tests/test_strict_content_type_nested.py
inner_strict = APIRouter(prefix="/strict", strict_content_type=True) inner_default = APIRouter(prefix="/default") @inner_strict.post("/items/") async def inner_strict_post(data: dict): return data @inner_default.post("/items/") async def inner_default_post(data: dict): return data outer_router.include_router(inner_strict) outer_router.include_router(inner_default)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Feb 23 17:45:20 GMT 2026 - 2.7K 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) -
docs_src/dependencies/tutorial001_an_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: Annotated[dict, Depends(common_parameters)]): return 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 - 454 bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java
throw new RuntimeException(e); } } @Override public boolean isAsync() { return async; } public void setAsync(boolean async) { this.async = async; } @Override public boolean isRetainPayload() { return retainPayload; }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 19.3K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/events.md
### Lifespan 函式 { #lifespan-function } 首先要注意的是,我們定義了一個帶有 `yield` 的 async 函式。這和帶有 `yield` 的依賴(Dependencies)非常相似。 {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} 函式在 `yield` 之前的部分,會在應用啟動前先執行。 `yield` 之後的部分,會在應用結束後再執行。 ### 非同步內容管理器(Async Context Manager) { #async-context-manager } 你會看到這個函式被 `@asynccontextmanager` 裝飾。 它會把函式轉換成所謂的「**非同步內容管理器(async context manager)**」。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 7.2K bytes - Click Count (0) -
tests/test_response_change_status_code.py
from fastapi.testclient import TestClient app = FastAPI() async def response_status_setter(response: Response): response.status_code = 201 async def parent_dep(result=Depends(response_status_setter)): return result @app.get("/", dependencies=[Depends(parent_dep)]) async def get_main(): return {"msg": "Hello World"} client = TestClient(app)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 589 bytes - Click Count (0) -
cmd/local-locker.go
package cmd //go:generate msgp -file=$GOFILE -unexported import ( "context" "fmt" "strconv" "sync" "sync/atomic" "time" "github.com/minio/minio/internal/dsync" ) // Reject new lock requests immediately when this many are queued // for the local lock mutex. // We do not block unlocking or maintenance, but they add to the count.
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 12K bytes - Click Count (0) -
docs/pt/docs/advanced/stream-data.md
### Arquivos e async { #files-and-async } Na maioria dos casos, objetos semelhantes a arquivo não são compatíveis com async e await por padrão. Por exemplo, eles não têm `await file.read()`, nem `async for chunk in file`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:13 GMT 2026 - 5.7K bytes - Click Count (0) -
tests/test_response_model_data_filter_no_inheritance.py
name: str owner: UserDB class PetOut(BaseModel): name: str owner: User @app.post("/users/", response_model=User) async def create_user(user: UserCreate): return user @app.get("/pets/{pet_id}", response_model=PetOut) async def read_pet(pet_id: int): user = UserDB( email="******@****.***", hashed_password="secrethashed", )Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.7K bytes - Click Count (0)