- Sort Score
- Result 10 results
- Languages All
Results 1691 - 1700 of 1,916 for FastApi (0.05 sec)
-
tests/test_request_params/test_form/test_list.py
from typing import Annotated import pytest from dirty_equals import IsOneOf, IsPartialDict from fastapi import FastAPI, Form from fastapi.testclient import TestClient from pydantic import BaseModel, Field from .utils import get_body_model_name app = FastAPI() # ===================================================================================== # Without aliases @app.post("/required-list-str", operation_id="required_list_str")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:31:34 UTC 2025 - 11.7K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial003_py39 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.6K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial006.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ pytest.param("tutorial006_py39"), pytest.param("tutorial006_an_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module( f"docs_src.query_params_str_validations.{request.param}" ) client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.4K bytes - Viewed (0) -
tests/test_tutorial/test_response_directly/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_directly.{request.param}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 5.1K bytes - Viewed (0) -
fastapi/_compat/v2.py
from enum import Enum from functools import lru_cache from typing import ( Annotated, Any, Union, cast, ) from fastapi._compat import shared from fastapi.openapi.constants import REF_TEMPLATE from fastapi.types import IncEx, ModelNameMap, UnionType from pydantic import BaseModel, ConfigDict, Field, TypeAdapter, create_model
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 19.1K bytes - Viewed (0) -
docs/zh/docs/advanced/openapi-callbacks.md
API 的用户 (外部开发者)要在您的 API 内使用 POST 请求创建一条发票记录。 (假设)您的 API 将: * 把发票发送至外部开发者的消费者 * 归集现金 * 把通知发送至 API 的用户(外部开发者) * 通过(从您的 API)发送 POST 请求至外部 API (即**回调**)来完成 ## 常规 **FastAPI** 应用 添加回调前,首先看下常规 API 应用是什么样子。 常规 API 应用包含接收 `Invoice` 请求体的*路径操作*,还有包含回调 URL 的查询参数 `callback_url`。 这部分代码很常规,您对绝大多数代码应该都比较熟悉了: {* ../../docs_src/openapi_callbacks/tutorial001.py hl[10:14,37:54] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 6.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/middleware.md
# Middleware (Промежуточный слой) { #middleware } Вы можете добавить промежуточный слой (middleware) в **FastAPI** приложение. "Middleware" это функция, которая выполняется с каждым запросом до его обработки какой-либо конкретной *операцией пути*. А также с каждым ответом перед его возвращением. * Она принимает каждый поступающий **запрос**. * Может что-то сделать с этим **запросом** или выполнить любой нужный код.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.3K bytes - Viewed (0) -
scripts/sponsors.py
subprocess.run( ["git", "config", "user.email", "github-actions[bot]@users.noreply.github.com"], check=True, ) branch_name = f"fastapi-people-sponsors-{secrets.token_hex(4)}" logging.info(f"Creating a new branch {branch_name}") subprocess.run(["git", "checkout", "-b", branch_name], check=True) logging.info("Adding updated file")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 12:34:01 UTC 2025 - 6.1K bytes - Viewed (0) -
scripts/playwright/sql_databases/image02.py
page.screenshot(path="docs/en/docs/img/tutorial/sql-databases/image02.png") # --------------------- context.close() browser.close() process = subprocess.Popen( ["fastapi", "run", "docs_src/sql_databases/tutorial002.py"], ) try: for _ in range(3): try: response = httpx.get("http://localhost:8000/docs") except httpx.ConnectError: time.sleep(1)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/uk/docs/tutorial/cookie-params.md
/// note | Технічні Деталі `Cookie` це "сестра" класів `Path` і `Query`. Вони наслідуються від одного батьківського класу `Param`. Але пам'ятайте, що коли ви імпортуєте `Query`, `Path`, `Cookie` та інше з `fastapi`, це фактично функції, що повертають спеціальні класи. /// /// info Для визначення cookies ви маєте використовувати `Cookie`, тому що в іншому випадку параметри будуть інтерпритовані, як параметри запиту. ///
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 1.6K bytes - Viewed (0)