- Sort Score
- Result 10 results
- Languages All
Results 1731 - 1740 of 1,962 for fastapi (0.05 sec)
-
tests/test_tutorial/test_extra_data_types/test_tutorial001_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.extra_data_types.tutorial001_py310 import app client = TestClient(app) return client @needs_py310 def test_extra_types(client: TestClient): item_id = "ff97dd87-a4a5-4a12-b412-cde99f33e00e" data = {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 7K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/global-dependencies.md
De forma semelhante a [adicionar dependências (`dependencies`) em *decoradores de operação de rota*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank}, você pode adicioná-las à aplicação `FastAPI`. Nesse caso, elas serão aplicadas a todas as *operações de rota* da aplicação: //// tab | Python 3.9+ ```Python hl_lines="16" {!> ../../docs_src/dependencies/tutorial012_an_py39.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.5K bytes - Viewed (0) -
docs/zh/docs/tutorial/middleware.md
# 中间件 你可以向 **FastAPI** 应用添加中间件. "中间件"是一个函数,它在每个**请求**被特定的*路径操作*处理之前,以及在每个**响应**返回之前工作. * 它接收你的应用程序的每一个**请求**. * 然后它可以对这个**请求**做一些事情或者执行任何需要的代码. * 然后它将**请求**传递给应用程序的其他部分 (通过某种*路径操作*). * 然后它获取应用程序生产的**响应** (通过某种*路径操作*). * 它可以对该**响应**做些什么或者执行任何需要的代码. * 然后它返回这个 **响应**. /// note | "技术细节" 如果你使用了 `yield` 关键字依赖, 依赖中的退出代码将在执行中间件*后*执行. 如果有任何后台任务(稍后记录), 它们将在执行中间件*后*运行. /// ## 创建中间件
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/ru/docs/tutorial/dependencies/sub-dependencies.md
# Подзависимости Вы можете создавать зависимости, которые имеют **подзависимости**. Их **вложенность** может быть любой глубины. **FastAPI** сам займётся их управлением. ## Провайдер зависимости Можно создать первую зависимость следующим образом: //// tab | Python 3.10+ ```Python hl_lines="8-9" {!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` //// //// tab | Python 3.9+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/sub-dependencies.md
# Subdependências Você pode criar dependências que possuem **subdependências**. Elas podem ter o nível de **profundidade** que você achar necessário. O **FastAPI** se encarrega de resolver essas dependências. ## Primeira dependência "injetável" Você pode criar uma primeira dependência (injetável) dessa forma: //// tab | Python 3.10+ ```Python hl_lines="8-9" {!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.9K bytes - Viewed (0) -
docs/en/docs/tutorial/header-params.md
/// note | "Technical Details" `Header` is a "sister" class of `Path`, `Query` and `Cookie`. It also inherits from the same common `Param` class. But remember that when you import `Query`, `Path`, `Header`, and others from `fastapi`, those are actually functions that return special classes. /// /// info To declare headers, you need to use `Header`, because otherwise the parameters would be interpreted as query parameters. ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_background_tasks/test_tutorial002.py
import os from pathlib import Path from fastapi.testclient import TestClient from docs_src.background_tasks.tutorial002 import app client = TestClient(app) def test(): log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***?q=some-query") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 568 bytes - Viewed (0) -
.github/workflows/issue-manager.yml
pull_request_target: types: - labeled workflow_dispatch: permissions: issues: write pull-requests: write jobs: issue-manager: if: github.repository_owner == 'fastapi' runs-on: ubuntu-latest steps: - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - uses: tiangolo/issue-manager@0.5.1
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 15 10:38:53 UTC 2024 - 1.4K bytes - Viewed (0) -
scripts/playwright/query_param_models/image01.py
page.screenshot(path="docs/en/docs/img/tutorial/query-param-models/image01.png") # --------------------- context.close() browser.close() process = subprocess.Popen( ["fastapi", "run", "docs_src/query_param_models/tutorial001.py"] ) try: for _ in range(3): try: response = httpx.get("http://localhost:8000/docs") except httpx.ConnectError:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial008d_an_py39 import app client = TestClient(app) return client @needs_py39 def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.3K bytes - Viewed (0)