- Sort Score
- Num 10 results
- Language All
Results 181 - 190 of 685 for Dict (0.02 seconds)
-
docs/en/docs/advanced/templates.md
### Template Context Values { #template-context-values } In the HTML that contains: {% raw %} ```jinja Item ID: {{ id }} ``` {% endraw %} ...it will show the `id` taken from the "context" `dict` you passed: ```Python {"id": id} ``` For example, with an ID of `42`, this would render: ```html Item ID: 42 ``` ### Template `url_for` Arguments { #template-url-for-arguments }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 3.4K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
原因很简单,假如数据库被盗,窃贼无法获取用户的明文密码,得到的只是哈希值。 这样一来,窃贼就无法在其它应用中使用窃取的密码,要知道,很多用户在所有系统中都使用相同的密码,风险超大。 {* ../../docs_src/security/tutorial003_an_py310.py hl[82:85] *} #### 关于 `**user_dict` { #about-user-dict } `UserInDB(**user_dict)` 是指: *直接把 `user_dict` 的键与值当作关键字参数传递,等效于:* ```Python UserInDB( username = user_dict["username"], email = user_dict["email"],Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 9K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/security/simple-oauth2.md
如果你的資料庫被竊取,攻擊者拿到的不是使用者的純文字密碼,而只是雜湊值。 因此攻擊者無法嘗試把那些密碼用在其他系統上(因為很多使用者在各處都用同一組密碼,這會很危險)。 {* ../../docs_src/security/tutorial003_an_py310.py hl[82:85] *} #### 關於 `**user_dict**` { #about-user-dict } `UserInDB(**user_dict)` 的意思是: 把 `user_dict` 的鍵和值直接當作具名參數傳入,等同於: ```Python UserInDB( username = user_dict["username"], email = user_dict["email"],Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 9.1K bytes - Click Count (0) -
tests/test_dependency_yield_scope_websockets.py
from typing import Annotated, Any import pytest from fastapi import Depends, FastAPI, WebSocket from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient global_context: ContextVar[dict[str, Any]] = ContextVar("global_context", default={}) # noqa: B039 class Session: def __init__(self) -> None: self.open = True async def dep_session() -> Any: s = Session() yield s
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 6K bytes - Click Count (0) -
docs/ko/docs/tutorial/security/get-current-user.md
그리고 보안 요구 사항을 위해 어떤 모델이나 데이터든 사용할 수 있습니다(이 경우 Pydantic 모델 `User`). 하지만 특정 데이터 모델, 클래스 또는 타입만 사용해야 하는 것은 아닙니다. 모델에 `id`와 `email`이 있고 `username`은 없게 하고 싶으신가요? 물론입니다. 같은 도구를 사용할 수 있습니다. `str`만 갖고 싶으신가요? 아니면 `dict`만요? 또는 데이터베이스 클래스 모델 인스턴스를 직접 쓰고 싶으신가요? 모두 같은 방식으로 동작합니다. 애플리케이션에 로그인하는 사용자는 없고, 액세스 토큰만 가진 로봇, 봇 또는 다른 시스템만 있나요? 이것도 마찬가지로 모두 동일하게 동작합니다.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:57:01 GMT 2026 - 4.9K bytes - Click Count (0) -
docs/en/docs/tutorial/security/get-current-user.md
Do you want to have an `id` and `email` and not have any `username` in your model? Sure. You can use these same tools. Do you want to just have a `str`? Or just a `dict`? Or a database class model instance directly? It all works the same way. You actually don't have users that log in to your application but robots, bots, or other systems, that have just an access token? Again, it all works the same.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 4K bytes - Click Count (0) -
scripts/mkdocs_hooks.py
def resolve_files(*, items: list[Any], files: Files, config: MkDocsConfig) -> None: for item in items: if isinstance(item, str): resolve_file(item=item, files=files, config=config) elif isinstance(item, dict): assert len(item) == 1 values = list(item.values()) if not values: continue if isinstance(values[0], str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 6.6K bytes - Click Count (0) -
docs/ja/docs/features.md
すべてに妥当な **デフォルト** があり、どこでもオプションで構成できます。必要に応じてすべてのパラメータを微調整して、求める API を定義できます。 しかしデフォルトのままでも、すべて **うまく動きます**。 ### 検証 { #validation } * ほとんど(あるいはすべて?)の Python の **データ型** に対する検証: * JSON オブジェクト(`dict`)。 * 項目の型を定義する JSON 配列(`list`)。 * 文字列(`str`)フィールドの最小/最大長。 * 数値(`int`、`float`)の最小/最大値、など。 * よりエキゾチックな型の検証: * URL。 * Email。 * UUID。 * ...その他。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 11.6K bytes - Click Count (0) -
docs/zh/docs/features.md
### 简洁 { #short } 任何类型都有合理的**默认值**,任何和地方都有可选配置。所有的参数被微调,来满足你的需求,定义成你需要的 API。 但是默认情况下,一切都能**“顺利工作”**。 ### 验证 { #validation } * 校验大部分(甚至所有?)的 Python **数据类型**,包括: * JSON 对象 (`dict`)。 * JSON 数组 (`list`) 定义成员类型。 * 字符串 (`str`) 字段,定义最小或最大长度。 * 数字 (`int`, `float`) 有最大值和最小值,等等。 * 校验外来类型,比如: * URL。 * Email。 * UUID。 * ...及其他。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 8.7K bytes - Click Count (0) -
fastapi/datastructures.py
return cast(UploadFile, __input_value) @classmethod def __get_pydantic_json_schema__( cls, core_schema: Mapping[str, Any], handler: GetJsonSchemaHandler ) -> dict[str, Any]: return {"type": "string", "contentMediaType": "application/octet-stream"} @classmethod def __get_pydantic_core_schema__(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 5.2K bytes - Click Count (0)