- Sort Score
- Result 10 results
- Languages All
Results 301 - 310 of 874 for tutorial001 (0.09 sec)
-
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) -
tests/test_tutorial/test_header_params/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.header_params.tutorial001 import app client = TestClient(app) @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"User-Agent": "testclient"}), ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/security/first-steps.md
Vamos primeiro usar o código e ver como funciona, e depois voltaremos para entender o que está acontecendo. ## Crie um `main.py` Copie o exemplo em um arquivo `main.py`: ```Python {!../../docs_src/security/tutorial001.py!} ``` ## Execute-o /// info | "informação" /// Primeiro, instale <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/middleware.md
* 一个函数 `call_next` 它将接收 `request` 作为参数. * 这个函数将 `request` 传递给相应的 *路径操作*. * 然后它将返回由相应的*路径操作*生成的 `response`. * 然后你可以在返回 `response` 前进一步修改它. ```Python hl_lines="8-9 11 14" {!../../docs_src/middleware/tutorial001.py!} ``` /// tip 请记住可以 <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">用'X-' 前缀</a>添加专有自定义请求头.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
``` //// //// tab | Python 3.8+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="11" {!> ../../docs_src/dependencies/tutorial001.py!} ``` //// But then we get a `dict` in the parameter `commons` of the *path operation function*.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-multiple-params.md
```Python hl_lines="17-19" {!> ../../docs_src/body_multiple_params/tutorial001_py310.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="19-21" {!> ../../docs_src/body_multiple_params/tutorial001.py!} ``` //// /// note | "Nota" Repare que, neste caso, o `item` que seria capturado a partir do corpo é opcional. Visto que ele possui `None` como valor padrão. ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6K bytes - Viewed (0) -
docs/zh/docs/advanced/dataclasses.md
但 FastAPI 还可以使用数据类(<a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a>): ```Python hl_lines="1 7-12 19-20" {!../../docs_src/dataclasses/tutorial001.py!} ``` 这还是借助于 **Pydantic** 及其<a href="https://pydantic-docs.helpmanual.io/usage/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">内置的 `dataclasses`</a>。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.7K bytes - Viewed (0)