- Sort Score
- Result 10 results
- Languages All
Results 431 - 440 of 871 for tutorial001 (0.11 sec)
-
tests/test_tutorial/test_body_fields/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.body_fields.tutorial001 import app client = TestClient(app) return client def test_items_5(client: TestClient): response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}}) assert response.status_code == 200 assert response.json() == {
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.2K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_param_models/test_tutorial001.py
from fastapi.testclient import TestClient from inline_snapshot import snapshot from tests.utils import needs_py39, needs_py310 @pytest.fixture( name="client", params=[ "tutorial001", pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an", pytest.param("tutorial001_an_py39", marks=needs_py39), pytest.param("tutorial001_an_py310", marks=needs_py310),
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.dependencies.tutorial001 import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/items", 200, {"q": None, "skip": 0, "limit": 100}), ("/items?q=foo", 200, {"q": "foo", "skip": 0, "limit": 100}),
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7K bytes - Viewed (0) -
docs/de/docs/advanced/using-request-directly.md
Angenommen, Sie möchten auf die IP-Adresse/den Host des Clients in Ihrer *Pfadoperation-Funktion* zugreifen. Dazu müssen Sie direkt auf den Request zugreifen. ```Python hl_lines="1 7-8" {!../../docs_src/using_request_directly/tutorial001.py!} ``` Durch die Deklaration eines *Pfadoperation-Funktionsparameters*, dessen Typ der `Request` ist, weiß **FastAPI**, dass es den `Request` diesem Parameter übergeben soll. /// tip | "Tipp"
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.5K bytes - Viewed (0) -
docs/ja/docs/tutorial/query-params-str-validations.md
### `Query`のインポート そのために、まずは`fastapi`から`Query`をインポートします: ```Python hl_lines="3" {!../../docs_src/query_params_str_validations/tutorial002.py!} ``` ## デフォルト値として`Query`を使用 パラメータのデフォルト値として使用し、パラメータ`max_length`を50に設定します: ```Python hl_lines="9" {!../../docs_src/query_params_str_validations/tutorial002.py!} ``` デフォルト値`None`を`Query(default=None)`に置き換える必要があるので、`Query`の最初の引数はデフォルト値を定義するのと同じです。 なので: ```Python
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.5K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/first-steps.md
```Python {!> ../../docs_src/security/tutorial001_an.py!} ``` //// //// tab | Python 3.8+ non-Annotated /// tip 尽可能选择使用 `Annotated` 的版本。 /// ```Python {!> ../../docs_src/security/tutorial001.py!} ``` //// ## 运行 /// info | "说明" 先安装 <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>。 安装命令: `pip install python-multipart`。
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.3K bytes - Viewed (0) -
docs/de/docs/tutorial/security/first-steps.md
``` //// //// tab | Python 3.8+ nicht annotiert /// tip | "Tipp" Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python {!> ../../docs_src/security/tutorial001.py!} ``` //// ## Ausführen /// info
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.2K bytes - Viewed (0) -
docs/ru/docs/tutorial/body-multiple-params.md
//// tab | Python 3.8+ non-Annotated /// tip | "Заметка" Рекомендуется использовать версию с `Annotated`, если это возможно. /// ```Python hl_lines="19-21" {!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// /// note | "Заметка" Заметьте, что в данном случае параметр `item`, который будет взят из тела запроса, необязателен. Так как было установлено значение `None` по умолчанию. ///
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/ja/docs/tutorial/encoder.md
同様に、このデータベースはPydanticモデル(属性を持つオブジェクト)を受け取らず、`dict`だけを受け取ります。 そのために`jsonable_encoder`を使用することができます。 Pydanticモデルのようなオブジェクトを受け取り、JSON互換版を返します: ```Python hl_lines="5 22" {!../../docs_src/encoder/tutorial001.py!} ``` この例では、Pydanticモデルを`dict`に、`datetime`を`str`に変換します。 呼び出した結果は、Pythonの標準の<a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>でエンコードできるものです。
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.9K bytes - Viewed (0) -
docs/em/docs/how-to/graphql.md
⚓️ 🔛 👆 ⚙️ 💼, 👆 5️⃣📆 💖 ⚙️ 🎏 🗃, ✋️ 🚥 👆 💭 👤, 👤 🔜 🎲 🤔 👆 🔄 **🍓**. 📥 🤪 🎮 ❔ 👆 💪 🛠️ 🍓 ⏮️ FastAPI: ```Python hl_lines="3 22 25-26" {!../../docs_src/graphql/tutorial001.py!} ``` 👆 💪 💡 🌅 🔃 🍓 <a href="https://strawberry.rocks/" class="external-link" target="_blank">🍓 🧾</a>.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0)