- Sort Score
- Num 10 results
- Language All
Results 1081 - 1090 of 2,110 for py$ (0.06 seconds)
-
docs/zh-hant/docs/advanced/openapi-callbacks.md
{* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[1,23] *} ### 建立回呼的「路徑操作」 { #create-the-callback-path-operation } 要建立回呼的「路徑操作」,就使用你上面建立的同一個 `APIRouter`。 它看起來就像一般的 FastAPI「路徑操作」: * 可能需要宣告它應該接收的 body,例如 `body: InvoiceEvent`。 * 也可以宣告它應該回傳的 response,例如 `response_model=InvoiceEventReceived`。 {* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[14:16,19:20,26:30] *} 和一般「路徑操作」相比有兩個主要差異:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 7.5K bytes - Click Count (0) -
docs/ko/docs/fastapi-cli.md
Searching for package file structure from directories with <font color="#3465A4">__init__.py</font> files Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font> <span style="background-color:#007166"><font color="#D3D7CF"> module </font></span> 🐍 main.pyCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 6.5K bytes - Click Count (0) -
docs/en/docs/tutorial/body-fields.md
{* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *} /// warning Notice that `Field` is imported directly from `pydantic`, not from `fastapi` as are all the rest (`Query`, `Path`, `Body`, etc). /// ## Declare model attributes { #declare-model-attributes } You can then use `Field` with model attributes: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[11:14] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Aug 31 09:15:41 GMT 2025 - 2.3K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/security/http-basic-auth.md
- 使用 `HTTPBasic` 建立一個「`security` scheme」。 - 在你的*路徑操作*中以依賴的方式使用該 `security`。 - 它會回傳一個 `HTTPBasicCredentials` 型別的物件: - 其中包含傳來的 `username` 與 `password`。 {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *} 當你第一次嘗試開啟該 URL(或在文件中點擊 "Execute" 按鈕)時,瀏覽器會要求輸入你的使用者名稱與密碼: <img src="/img/tutorial/security/image12.png"> ## 檢查使用者名稱 { #check-the-username } 以下是一個更完整的範例。 使用一個依賴來檢查使用者名稱與密碼是否正確。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 4.7K bytes - Click Count (0) -
docs/en/docs/fastapi-cli.md
Searching for package file structure from directories with <font color="#3465A4">__init__.py</font> files Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font> <span style="background-color:#007166"><font color="#D3D7CF"> module </font></span> 🐍 main.pyCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 07 09:29:03 GMT 2026 - 5.8K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/cookie-param-models.md
同樣的技巧也適用於 `Query`、`Cookie` 與 `Header`。😎 /// ## 以 Pydantic 模型宣告 Cookie { #cookies-with-a-pydantic-model } 在 **Pydantic 模型**中宣告所需的 **Cookie** 參數,接著將參數宣告為 `Cookie`: {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *} **FastAPI** 會從請求收到的 **Cookie** 中擷取 **每個欄位** 的資料,並交給你定義的 Pydantic 模型。 ## 查看文件 { #check-the-docs } 你可以在 `/docs` 的文件介面中看到已定義的 Cookie: <div class="screenshot">Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 2.9K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/extra-data-types.md
## 範例 { #example } 以下是一個帶有參數、使用上述部分型別的 *路徑操作 (path operation)* 範例。 {* ../../docs_src/extra_data_types/tutorial001_an_py310.py hl[1,3,12:16] *} 請注意,函式內的參數會是它們的自然資料型別,因此你可以進行一般的日期運算,例如:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 2.6K bytes - Click Count (0) -
docs/zh/docs/tutorial/extra-data-types.md
## 例子 { #example } 下面是一个*路径操作*的示例,其中的参数使用了上面的一些类型。 {* ../../docs_src/extra_data_types/tutorial001_an_py310.py hl[1,3,12:16] *} 注意,函数内的参数有原生的数据类型,你可以,例如,执行正常的日期操作,如:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 2.5K bytes - Click Count (0) -
docs/en/docs/advanced/settings.md
For example, you could have a file `config.py` with: {* ../../docs_src/settings/app01_py310/config.py *} And then use it in a file `main.py`: {* ../../docs_src/settings/app01_py310/main.py hl[3,11:13] *} /// tip You would also need a file `__init__.py` as you saw in [Bigger Applications - Multiple Files](../tutorial/bigger-applications.md). ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 10.9K bytes - Click Count (0) -
docs/en/docs/advanced/security/http-basic-auth.md
* Use that `security` with a dependency in your *path operation*. * It returns an object of type `HTTPBasicCredentials`: * It contains the `username` and `password` sent. {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *} When you try to open the URL for the first time (or click the "Execute" button in the docs) the browser will ask you for your username and password: <img src="/img/tutorial/security/image12.png">Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 5K bytes - Click Count (0)