- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for get_valid (0.13 sec)
-
docs/en/docs/tutorial/dependencies/sub-dependencies.md
async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.8+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/test_validate_response_dataclass.py
app = FastAPI() @dataclass class Item: name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/invalid", response_model=Item) def get_invalid(): return {"name": "invalid", "price": "foo"} @app.get("/items/innerinvalid", response_model=Item) def get_innerinvalid(): return {"name": "double invalid", "price": "foo", "owner_ids": ["foo", "bar"]}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_validate_response.py
app = FastAPI() class Item(BaseModel): name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/invalid", response_model=Item) def get_invalid(): return {"name": "invalid", "price": "foo"} @app.get("/items/invalidnone", response_model=Item) def get_invalid_none(): return None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/sub-dependencies.md
async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.6+ без Annotated /// tip | "Подсказка" Предпочтительнее использовать версию с аннотацией, если это возможно. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/sub-dependencies.md
async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.8+ non-Annotated /// tip | "Dica" Utilize a versão com `Annotated` se possível. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.9K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/sub-dependencies.md
async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.8+ nicht annotiert /// tip | "Tipp" Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.2K bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/sub-dependencies.md
🏧 😐 🌐❔ 👆 💭 👆 💪 🔗 🤙 🔠 🔁 (🎲 💗 🕰) 🎏 📨 ↩️ ⚙️ "💾" 💲, 👆 💪 ⚒ 🔢 `use_cache=False` 🕐❔ ⚙️ `Depends`: ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ``` ## 🌃 ↖️ ⚪️➡️ 🌐 🎀 🔤 ⚙️ 📥, **🔗 💉** ⚙️ 🙅. 🔢 👈 👀 🎏 *➡ 🛠️ 🔢*. ✋️, ⚫️ 📶 🏋️, & ✔ 👆 📣 🎲 🙇 🐦 🔗 "📊" (🌲).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/sub-dependencies.md
在高级使用场景中,如果不想使用「缓存」值,而是为需要在同一请求的每一步操作(多次)中都实际调用依赖项,可以把 `Depends` 的参数 `use_cache` 的值设置为 `False` : ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ``` ## 小结 千万别被本章里这些花里胡哨的词藻吓倒了,其实**依赖注入**系统非常简单。 依赖注入无非是与*路径操作函数*一样的函数罢了。 但它依然非常强大,能够声明任意嵌套深度的「图」或树状的依赖结构。 /// tip | "提示"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.2K bytes - Viewed (0) -
istioctl/pkg/writer/compare/sds/util.go
TrustDomain string `json:"trust_domain"` SecretMeta } // SecretMeta holds selected fields which can be extracted from parsed x509 cert type SecretMeta struct { Valid bool `json:"cert_valid"` SerialNumber string `json:"serial_number"` NotAfter string `json:"not_after"` NotBefore string `json:"not_before"` Type string `json:"type"` TrustDomain string `json:"trust_domain"` }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Oct 28 19:52:53 UTC 2024 - 8.5K bytes - Viewed (0) -
src/archive/tar/tar_test.go
wantValid: false, }, { in: []sparseEntry{{1, 3}, {2, 2}}, size: 10, wantValid: false, }} for i, v := range vectors { gotValid := validateSparseEntries(v.in, v.size) if gotValid != v.wantValid { t.Errorf("test %d, validateSparseEntries() = %v, want %v", i, gotValid, v.wantValid) } if !v.wantValid { continue } gotAligned := alignSparseEntries(append([]sparseEntry{}, v.in...), v.size)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 23.9K bytes - Viewed (0)