- Sort Score
- Result 10 results
- Languages All
Results 311 - 320 of 475 for tiap (0.02 sec)
-
docs/zh/docs/advanced/response-cookies.md
你可以参考[Return a Response Directly](response-directly.md){.internal-link target=_blank}来创建response 然后设置Cookies,并返回: ```Python hl_lines="10-12" {!../../docs_src/response_cookies/tutorial001.py!} ``` /// tip 需要注意,如果你直接反馈一个response对象,而不是使用`Response`入参,FastAPI则会直接反馈你封装的response对象。 所以你需要确保你响应数据类型的正确性,如:你可以使用`JSONResponse`来兼容JSON的场景。 同时,你也应当仅反馈通过`response_model`过滤过的数据。 /// ### 更多信息 /// note | "技术细节"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.1K bytes - Viewed (0) -
docs/zh/docs/advanced/using-request-directly.md
假设要在*路径操作函数*中获取客户端 IP 地址和主机。 此时,需要直接访问请求。 ```Python hl_lines="1 7-8" {!../../docs_src/using_request_directly/tutorial001.py!} ``` 把*路径操作函数*的参数类型声明为 `Request`,**FastAPI** 就能把 `Request` 传递到参数里。 /// tip | "提示" 注意,本例除了声明请求参数之外,还声明了路径参数。 因此,能够提取、验证路径参数、并转换为指定类型,还可以用 OpenAPI 注释。 同样,您也可以正常声明其它参数,而且还可以提取 `Request`。 /// ## `Request` 文档
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
You **don't call it** directly (don't add the parenthesis at the end), you just pass it as a parameter to `Depends()`. And that function takes parameters in the same way that *path operation functions* do. /// tip You'll see what other "things", apart from functions, can be used as dependencies in the next chapter. /// Whenever a new request arrives, **FastAPI** will take care of:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 11:18:17 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/em/docs/tutorial/body-fields.md
& Pydantic `Field` 📨 👐 `FieldInfo` 👍. `Body` 📨 🎚 🏿 `FieldInfo` 🔗. & 📤 🎏 👆 🔜 👀 ⏪ 👈 🏿 `Body` 🎓. 💭 👈 🕐❔ 👆 🗄 `Query`, `Path`, & 🎏 ⚪️➡️ `fastapi`, 👈 🤙 🔢 👈 📨 🎁 🎓. /// /// tip 👀 ❔ 🔠 🏷 🔢 ⏮️ 🆎, 🔢 💲 & `Field` ✔️ 🎏 📊 *➡ 🛠️ 🔢* 🔢, ⏮️ `Field` ↩️ `Path`, `Query` & `Body`. /// ## 🚮 ➕ ℹ 👆 💪 📣 ➕ ℹ `Field`, `Query`, `Body`, ♒️. & ⚫️ 🔜 🔌 🏗 🎻 🔗.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.2K bytes - Viewed (0) -
docs/en/docs/tutorial/body-fields.md
Remember that when you import `Query`, `Path`, and others from `fastapi`, those are actually functions that return special classes. /// /// tip Notice how each model's attribute with a type, default value and `Field` has the same structure as a *path operation function's* parameter, with `Field` instead of `Path`, `Query` and `Body`. /// ## Add extra information
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:01:18 UTC 2024 - 2.2K bytes - Viewed (0) -
docs/en/docs/advanced/templates.md
Before FastAPI 0.108.0, Starlette 0.29.0, the `name` was the first parameter. Also, before that, in previous versions, the `request` object was passed as part of the key-value pairs in the context for Jinja2. /// /// tip By declaring `response_class=HTMLResponse` the docs UI will be able to know that the response will be HTML. /// /// note | "Technical Details"
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/advanced/templates.md
```Python hl_lines="4 11 15-16" {!../../docs_src/templates/tutorial001.py!} ``` /// note | "笔记" 在FastAPI 0.108.0,Starlette 0.29.0之前,`name`是第一个参数。 并且,在此之前,`request`对象是作为context的一部分以键值对的形式传递的。 /// /// tip | "提示" 通过声明 `response_class=HTMLResponse`,API 文档就能识别响应的对象是 HTML。 /// /// note | "技术细节" 您还可以使用 `from starlette.templating import Jinja2Templates`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.8K bytes - Viewed (0) -
docs/nl/docs/python-types.md
In dit geval is `str` de typeparameter die wordt doorgegeven aan `List` (of `list` in Python 3.9 en hoger). /// Dat betekent: “de variabele `items` is een `list`, en elk van de items in deze list is een `str`”. /// tip Als je Python 3.9 of hoger gebruikt, hoef je `List` niet te importeren uit `typing`, je kunt in plaats daarvan hetzelfde reguliere `list` type gebruiken. ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.3K bytes - Viewed (0) -
docs/en/docs/tutorial/response-status-code.md
* `500` and above are for server errors. You almost never use them directly. When something goes wrong at some part in your application code, or server, it will automatically return one of these status codes. /// tip
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 11:13:18 UTC 2024 - 3.9K bytes - Viewed (0) -
docs/ja/docs/tutorial/body-fields.md
また、Pydanticの`Field`は`FieldInfo`のインスタンスも返します。 `Body`は`FieldInfo`のサブクラスのオブジェクトを直接返すこともできます。そして、他にも`Body`クラスのサブクラスであるものがあります。 `fastapi`から`Query`や`Path`などをインポートする場合、これらは実際には特殊なクラスを返す関数であることに注意してください。 /// /// tip | "豆知識" 型、デフォルト値、`Field`を持つ各モデルの属性が、`Path`や`Query`、`Body`の代わりに`Field`を持つ、*path operation 関数の*パラメータと同じ構造になっていることに注目してください。 /// ## 追加情報の追加 追加情報は`Field`や`Query`、`Body`などで宣言することができます。そしてそれは生成されたJSONスキーマに含まれます。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.5K bytes - Viewed (0)