- Sort Score
- Num 10 results
- Language All
Results 41 - 50 of 519 for tutorial003_an_py310 (0.1 seconds)
-
docs/zh/docs/tutorial/path-params-numeric-validations.md
{* ../../docs_src/path_params_numeric_validations/tutorial003_an_py310.py hl[10] *} ## 数值校验:大于等于 { #number-validations-greater-than-or-equal } 使用 `Query` 和 `Path`(以及你稍后会看到的其他类)你可以声明数值约束。 在这里,使用 `ge=1` 后,`item_id` 必须是一个整数,值要「`g`reater than or `e`qual」1。 {* ../../docs_src/path_params_numeric_validations/tutorial004_an_py310.py hl[10] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6K bytes - Click Count (0) -
docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md
所以,我们可以将上面的依赖项 "可依赖对象" `common_parameters` 更改为类 `CommonQueryParams`: {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[11:15] *} 注意用于创建类实例的 `__init__` 方法: {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[12] *} ...它与我们以前的 `common_parameters` 具有相同的参数: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[8] *} 这些参数就是 **FastAPI** 用来 "处理" 依赖项的。 在两个例子下,都有: * 一个可选的 `q` 查询参数,是 `str` 类型。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:37:57 GMT 2026 - 6.8K bytes - Click Count (0) -
docs/ja/docs/tutorial/body-multiple-params.md
例えば、前のモデルを拡張して、同じボディに `item` と `user` の他にもう一つのキー `importance` を入れたいと決めることができます。 単数値なのでそのまま宣言すると、**FastAPI** はそれがクエリパラメータであるとみなします。 しかし、`Body`を使用して、**FastAPI** に別のボディキーとして扱うように指示することができます: {* ../../docs_src/body_multiple_params/tutorial003_an_py310.py hl[23] *} この場合、**FastAPI** は以下のようなボディを期待します: ```JSON { "item": { "name": "Foo", "description": "The pretender", "price": 42.0, "tax": 3.2 },Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 5.9K bytes - Click Count (0) -
docs/en/docs/tutorial/schema-extra-example.md
### `Body` with `examples` { #body-with-examples } Here we pass `examples` containing one example of the data expected in `Body()`: {* ../../docs_src/schema_extra_example/tutorial003_an_py310.py hl[22:29] *} ### Example in the docs UI { #example-in-the-docs-ui } With any of the methods above it would look like this in the `/docs`: <img src="/img/tutorial/body-fields/image01.png">Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.7K bytes - Click Count (0) -
docs/ja/docs/tutorial/path-params-numeric-validations.md
{* ../../docs_src/path_params_numeric_validations/tutorial003_an_py310.py hl[10] *} ## 数値の検証: 以上 { #number-validations-greater-than-or-equal } `Query`と`Path`(、そして後述する他のもの)を用いて、数値の制約を宣言できます。 ここで、`ge=1`の場合、`item_id`は`1`「より大きい`g`か、同じ`e`」整数でなければなりません。 {* ../../docs_src/path_params_numeric_validations/tutorial004_an_py310.py hl[10] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 7.6K bytes - Click Count (0) -
docs/en/docs/tutorial/query-params-str-validations.md
{* ../../docs_src/query_params_str_validations/tutorial003_an_py310.py hl[10] *} ## Add regular expressions { #add-regular-expressions } You can define a <dfn title="A regular expression, regex or regexp is a sequence of characters that define a search pattern for strings.">regular expression</dfn> `pattern` that the parameter should match: {* ../../docs_src/query_params_str_validations/tutorial004_an_py310.py hl[11] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 16.3K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/schema-extra-example.md
{* ../../docs_src/schema_extra_example/tutorial003_an_py310.py hl[22:29] *} ### 文件 UI 中的範例 { #example-in-the-docs-ui } 使用以上任一方法,在 `/docs` 中看起來會像這樣: <img src="/img/tutorial/body-fields/image01.png"> ### `Body` 搭配多個 `examples` { #body-with-multiple-examples } 當然,你也可以傳入多個 `examples`: {* ../../docs_src/schema_extra_example/tutorial004_an_py310.py hl[23:38] *} 這麼做時,這些範例會成為該 body 資料內部 **JSON Schema** 的一部分。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 8.4K bytes - Click Count (0) -
docs/ja/docs/tutorial/schema-extra-example.md
{* ../../docs_src/schema_extra_example/tutorial003_an_py310.py hl[22:29] *} ### ドキュメントUIでの例 { #example-in-the-docs-ui } 上記のいずれの方法でも、`/docs`の中では以下のようになります: <img src="/img/tutorial/body-fields/image01.png"> ### 複数の`examples`を使う`Body` { #body-with-multiple-examples } もちろん、複数の`examples`を渡すこともできます: {* ../../docs_src/schema_extra_example/tutorial004_an_py310.py hl[23:38] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 10.5K bytes - Click Count (0) -
docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md
そこで、上で紹介した依存関係の"dependable" `common_parameters`を`CommonQueryParams`クラスに変更します: {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[11:15] *} クラスのインスタンスを作成するために使用される`__init__`メソッドに注目してください: {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[12] *} ...以前の`common_parameters`と同じパラメータを持っています: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[8] *} これらのパラメータは **FastAPI** が依存関係を「解決」するために使用するものです。 どちらの場合も以下を持っています:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 8.8K bytes - Click Count (0) -
docs/zh/docs/tutorial/schema-extra-example.md
{* ../../docs_src/schema_extra_example/tutorial003_an_py310.py hl[22:29] *} ### 文档 UI 中的示例 { #example-in-the-docs-ui } 使用上述任一方法,在 `/docs` 中看起来会是这样: <img src="/img/tutorial/body-fields/image01.png"> ### 带有多个 `examples` 的 `Body` { #body-with-multiple-examples } 当然,你也可以传入多个 `examples`: {* ../../docs_src/schema_extra_example/tutorial004_an_py310.py hl[23:38] *} 这样做时,这些示例会成为该请求体数据内部 JSON Schema 的一部分。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 8.5K bytes - Click Count (0)