- Sort Score
- Result 10 results
- Languages All
Results 671 - 680 of 877 for tutorial002 (0.07 sec)
-
docs/de/docs/tutorial/dependencies/global-dependencies.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial001.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.events.tutorial001 import app yield app def test_events(app: FastAPI): with TestClient(app) as client: response = client.get("/items/foo") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial003 import app client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 575 bytes - Viewed (0) -
docs/en/docs/tutorial/security/oauth2-jwt.md
//// //// tab | Python 3.8+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="8 49 56-57 60-61 70-76" {!> ../../docs_src/security/tutorial004.py!} ``` //// /// note If you check the new (fake) database `fake_users_db`, you will see how the hashed password looks like now: `"$2b$12$EixZaYVK1fsbw1ZfbX3OXePaWxn96p36WQoeG6Lruj3vjPGga31lW"`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 11:45:10 UTC 2024 - 12.8K bytes - Viewed (0) -
docs/zh/docs/tutorial/body-fields.md
``` //// //// tab | Python 3.8+ non-Annotated /// tip 尽可能选择使用 `Annotated` 的版本。 /// ```Python hl_lines="4" {!> ../../docs_src/body_fields/tutorial001.py!} ``` //// /// warning | "警告" 注意,与从 `fastapi` 导入 `Query`,`Path`、`Body` 不同,要直接从 `pydantic` 导入 `Field` 。 /// ## 声明模型属性 然后,使用 `Field` 定义模型的属性: //// tab | Python 3.10+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K bytes - Viewed (0) -
docs/ja/docs/tutorial/request-forms.md
/// ## `Form`のインポート `fastapi`から`Form`をインポートします: ```Python hl_lines="1" {!../../docs_src/request_forms/tutorial001.py!} ``` ## `Form`のパラメータの定義 `Body`や`Query`の場合と同じようにフォームパラメータを作成します: ```Python hl_lines="7" {!../../docs_src/request_forms/tutorial001.py!} ``` 例えば、OAuth2仕様が使用できる方法の1つ(「パスワードフロー」と呼ばれる)では、フォームフィールドとして`username`と`password`を送信する必要があります。
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/de/docs/advanced/testing-events.md
Wenn Sie in Ihren Tests Ihre Event-Handler (`startup` und `shutdown`) ausführen wollen, können Sie den `TestClient` mit einer `with`-Anweisung verwenden: ```Python hl_lines="9-12 20-24" {!../../docs_src/app_testing/tutorial003.py!}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 288 bytes - Viewed (0) -
docs/tr/docs/tutorial/static-files.md
## `StaticFiles` Kullanımı * `StaticFiles` sınıfını projenize dahil edin. * Bir `StaticFiles()` örneğini belirli bir yola bağlayın. ```Python hl_lines="2 6" {!../../docs_src/static_files/tutorial001.py!} ``` /// note | "Teknik Detaylar" Projenize dahil etmek için `from starlette.staticfiles import StaticFiles` kullanabilirsiniz.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.8K bytes - Viewed (0) -
docs/zh/docs/advanced/wsgi.md
## 使用 `WSGIMiddleware` 您需要导入 `WSGIMiddleware`。 然后使用该中间件包装 WSGI 应用(例如 Flask)。 之后将其挂载到某一个路径下。 ```Python hl_lines="2-3 22" {!../../docs_src/wsgi/tutorial001.py!} ``` ## 检查 现在,所有定义在 `/v1/` 路径下的请求将会被 Flask 应用处理。 其余的请求则会被 **FastAPI** 处理。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.cookie_params.tutorial001 import app @pytest.mark.parametrize( "path,cookies,expected_status,expected_response", [ ("/items", None, 200, {"ads_id": None}), ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}), ( "/items", {"ads_id": "ads_track", "session": "cookiesession"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.9K bytes - Viewed (0)