- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 386 for notes (0.13 sec)
-
docs/zh/docs/advanced/using-request-directly.md
同样,您也可以正常声明其它参数,而且还可以提取 `Request`。 ## `Request` 文档 更多细节详见 <a href="https://www.starlette.io/requests/" class="external-link" target="_blank">Starlette 官档 - `Request` 对象</a>。 !!! note "技术细节" 您也可以使用 `from starlette.requests import Request`。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 22:44:02 GMT 2024 - 2K bytes - Viewed (0) -
docs/es/docs/tutorial/cookie-params.md
=== "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="9" {!> ../../../docs_src/cookie_params/tutorial001.py!} ``` !!! note "Detalles Técnicos" `Cookie` es una clase "hermana" de `Path` y `Query`. También hereda de la misma clase común `Param`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 19:30:26 GMT 2024 - 2.4K bytes - Viewed (0) -
docs/em/docs/advanced/response-cookies.md
, 👆 🔜 ✔️ ⚒ 💭 👆 💽 ☑ 🆎. 🤶 Ⓜ. ⚫️ 🔗 ⏮️ 🎻, 🚥 👆 🛬 `JSONResponse`. & 👈 👆 🚫 📨 🙆 📊 👈 🔜 ✔️ ⛽ `response_model`. ### 🌅 ℹ !!! note "📡 ℹ" 👆 💪 ⚙️ `from starlette.responses import Response` ⚖️ `from starlette.responses import JSONResponse`. **FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 1.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/index.md
자습시에는 모든 선택적인 의존성 및 기능을 함께 설치하는 것을 추천합니다: <div class="termy"> ```console $ pip install "fastapi[all]" ---> 100% ``` </div> ...이는 코드를 실행하는 서버로 사용할 수 있는 `uvicorn` 또한 포함하고 있습니다. !!! note "참고" 부분적으로 설치할 수도 있습니다. 애플리케이션을 운영 환경에 배포하려는 경우 다음과 같이 합니다: ``` pip install fastapi ``` 추가로 서버 역할을 하는 `uvicorn`을 설치합니다: ``` pip install uvicorn ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Feb 02 17:39:46 GMT 2024 - 3K bytes - Viewed (0) -
docs/ja/docs/tutorial/first-steps.md
<span style="color: green;">INFO</span>: Waiting for application startup. <span style="color: green;">INFO</span>: Application startup complete. ``` </div> !!! note "備考" `uvicorn main:app`は以下を示します: * `main`: `main.py`ファイル (Python "module")。 * `app`: `main.py`内部で作られるobject(`app = FastAPI()`のように記述される)。 * `--reload`: コードの変更時にサーバーを再起動させる。開発用。 出力には次のような行があります:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/handling-errors.md
但该异常将会被 `unicorn_exception_handler` 处理。 接收到的错误信息清晰明了,HTTP 状态码为 `418`,JSON 内容如下: ```JSON {"message": "Oops! yolo did something. There goes a rainbow..."} ``` !!! note "技术细节" `from starlette.requests import Request` 和 `from starlette.responses import JSONResponse` 也可以用于导入 `Request` 和 `JSONResponse`。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.4K bytes - Viewed (0) -
docs/zh/docs/advanced/response-directly.md
对于这些情况,在将数据传递给响应之前,你可以使用 `jsonable_encoder` 来转换你的数据。 ```Python hl_lines="4 6 20 21" {!../../../docs_src/response_directly/tutorial001.py!} ``` !!! note "技术细节" 你也可以使用 `from starlette.responses import JSONResponse`。 出于方便,**FastAPI** 会提供与 `starlette.responses` 相同的 `fastapi.responses` 给开发者。但是大多数可用的响应都直接来自 Starlette。 ## 返回自定义 `Response`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 3.1K bytes - Viewed (0) -
tests/test_request_body_parameters_media_type.py
import typing from fastapi import Body, FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() media_type = "application/vnd.api+json" # NOTE: These are not valid JSON:API resources # but they are fine for testing requestBody with custom media_type class Product(BaseModel): name: str price: float class Shop(BaseModel): name: str @app.post("/products")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 6.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/response-model.md
{!> ../../../docs_src/response_model/tutorial001_py39.py!} ``` === "Python 3.8+" ```Python hl_lines="17 22 24-27" {!> ../../../docs_src/response_model/tutorial001.py!} ``` !!! note 注意,`response_model`是「装饰器」方法(`get`,`post` 等)的一个参数。不像之前的所有参数和请求体,它不属于*路径操作函数*。 它接收的类型与你将为 Pydantic 模型属性所声明的类型相同,因此它可以是一个 Pydantic 模型,但也可以是一个由 Pydantic 模型组成的 `list`,例如 `List[Item]`。 FastAPI 将使用此 `response_model` 来:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 7.9K bytes - Viewed (0) -
docs/en/docs/tutorial/body-fields.md
```Python hl_lines="11-14" {!> ../../../docs_src/body_fields/tutorial001.py!} ``` `Field` works the same way as `Query`, `Path` and `Body`, it has all the same parameters, etc. !!! note "Technical Details" Actually, `Query`, `Path` and others you'll see next create objects of subclasses of a common `Param` class, which is itself a subclass of Pydantic's `FieldInfo` class.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 3.6K bytes - Viewed (0)