- Sort Score
- Result 10 results
- Languages All
Results 361 - 370 of 874 for tutorial001 (0.13 sec)
-
docs/ru/docs/tutorial/static-files.md
## Использование `StaticFiles` * Импортируйте `StaticFiles`. * "Примонтируйте" экземпляр `StaticFiles()` с указанием определенной директории. ```Python hl_lines="2 6" {!../../docs_src/static_files/tutorial001.py!} ``` /// note | "Технические детали" Вы также можете использовать `from starlette.staticfiles import StaticFiles`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial001 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 4.3K bytes - Viewed (0) -
docs/en/docs/advanced/response-cookies.md
Then set Cookies in it, and then return it: ```Python hl_lines="10-12" {!../../docs_src/response_cookies/tutorial001.py!} ``` /// tip Keep in mind that if you return a response directly instead of using the `Response` parameter, FastAPI will return it directly.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.2K bytes - Viewed (0) -
docs/zh/docs/advanced/additional-responses.md
**FastAPI**将采用该模型,生成其`JSON Schema`并将其包含在`OpenAPI`中的正确位置。 例如,要声明另一个具有状态码 `404` 和`Pydantic`模型 `Message` 的响应,可以写: ```Python hl_lines="18 22" {!../../docs_src/additional_responses/tutorial001.py!} ``` /// note 请记住,您必须直接返回 `JSONResponse` 。 /// /// info `model` 密钥不是OpenAPI的一部分。 **FastAPI**将从那里获取`Pydantic`模型,生成` JSON Schema` ,并将其放在正确的位置。 - 正确的位置是:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.2K bytes - Viewed (0) -
docs/ru/docs/tutorial/debugging.md
## Вызов `uvicorn` В вашем FastAPI приложении, импортируйте и вызовите `uvicorn` напрямую: ```Python hl_lines="1 15" {!../../docs_src/debugging/tutorial001.py!} ``` ### Описание `__name__ == "__main__"` Главная цель использования `__name__ == "__main__"` в том, чтобы код выполнялся при запуске файла с помощью: <div class="termy"> ```console
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.8K bytes - Viewed (0) -
docs/de/docs/how-to/conditional-openapi.md
Sie können problemlos dieselben Pydantic-Einstellungen verwenden, um Ihre generierte OpenAPI und die Dokumentationsoberflächen zu konfigurieren. Zum Beispiel: ```Python hl_lines="6 11" {!../../docs_src/conditional_openapi/tutorial001.py!} ``` Hier deklarieren wir die Einstellung `openapi_url` mit dem gleichen Defaultwert `"/openapi.json"`. Und dann verwenden wir das beim Erstellen der `FastAPI`-App.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.8K bytes - Viewed (0) -
docs/ja/docs/tutorial/path-operation-configuration.md
```Python hl_lines="17 22 27" {!../../docs_src/path_operation_configuration/tutorial002.py!} ``` これらはOpenAPIスキーマに追加され、自動ドキュメントのインターフェースで使用されます: <img src="https://fastapi.tiangolo.com/img/tutorial/path-operation-configuration/image01.png"> ## 概要と説明 `summary`と`description`を追加できます: ```Python hl_lines="20-21" {!../../docs_src/path_operation_configuration/tutorial003.py!} ``` ## docstringを用いた説明
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.3K bytes - Viewed (0) -
scripts/playwright/header_param_models/image01.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 1.1K bytes - Viewed (0) -
scripts/playwright/request_form_models/image01.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 13 09:14:46 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/encoder.md
//// tab | Python 3.10+ ```Python hl_lines="4 21" {!> ../../docs_src/encoder/tutorial001_py310.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="5 22" {!> ../../docs_src/encoder/tutorial001.py!} ``` //// Neste exemplo, ele converteria o modelo Pydantic em um `dict`, e o `datetime` em um `str`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.9K bytes - Viewed (0)