- Sort Score
- Result 10 results
- Languages All
Results 1201 - 1210 of 1,916 for FastApi (0.08 sec)
-
docs/ja/docs/learn/index.md
# 学習 ここでは、**FastAPI** を学習するための入門セクションとチュートリアルを紹介します。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Aug 21 16:55:16 UTC 2024 - 295 bytes - Viewed (0) -
tests/test_tutorial/test_advanced_middleware/test_tutorial003.py
from fastapi.responses import PlainTextResponse from fastapi.testclient import TestClient from docs_src.advanced_middleware.tutorial003_py39 import app @app.get("/large") async def large(): return PlainTextResponse("x" * 4000, status_code=200) client = TestClient(app) def test_middleware(): response = client.get("/large", headers={"accept-encoding": "gzip"}) assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 670 bytes - Viewed (0) -
docs/zh/docs/python-types.md
/// 整个 **FastAPI** 建立在 Pydantic 的基础之上。 实际上你将在 [教程 - 用户指南](tutorial/index.md){.internal-link target=_blank} 看到很多这种情况。 ## **FastAPI** 中的类型提示 **FastAPI** 利用这些类型提示来做下面几件事。 使用 **FastAPI** 时用类型提示声明参数可以获得: * **编辑器支持**。 * **类型检查**。 ...并且 **FastAPI** 还会用这些类型声明来: * **定义参数要求**:声明对请求路径参数、查询参数、请求头、请求体、依赖等的要求。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Aug 18 06:34:40 UTC 2025 - 8.6K bytes - Viewed (0) -
docs/en/docs/reference/exceptions.md
You can use: * `HTTPException` * `WebSocketException` These exceptions can be imported directly from `fastapi`: ```python from fastapi import HTTPException, WebSocketException ``` ::: fastapi.HTTPException
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 597 bytes - Viewed (0) -
docs_src/security/tutorial002_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import OAuth2PasswordBearer from pydantic import BaseModel app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: str | None = None full_name: str | None = None disabled: bool | None = None def fake_decode_token(token): return User(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 761 bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md
以下にある最後の`CommonQueryParams`: ```Python ... = Depends(CommonQueryParams) ``` ...は、**FastAPI** が依存関係を知るために実際に使用するものです。 そこからFastAPIが宣言されたパラメータを抽出し、それが実際にFastAPIが呼び出すものです。 --- この場合、以下にある最初の`CommonQueryParams`: ```Python commons: CommonQueryParams ... ``` ...は **FastAPI** に対して特別な意味をもちません。FastAPIはデータ変換や検証などには使用しません(それらのためには`= Depends(CommonQueryParams)`を使用しています)。 実際には以下のように書けばいいだけです:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 7K bytes - Viewed (0) -
docs/ja/docs/tutorial/security/index.md
Google、Facebook、X (Twitter)、GitHubなど、他の認証/認可プロバイダを統合することも可能で、比較的簡単です。 最も複雑な問題は、それらのような認証/認可プロバイダを構築することですが、**FastAPI**は、あなたのために重い仕事をこなしながら、それを簡単に行うためのツールを提供します。 /// ## **FastAPI** ユーティリティ FastAPIは `fastapi.security` モジュールの中で、これらのセキュリティスキームごとにいくつかのツールを提供し、これらのセキュリティメカニズムを簡単に使用できるようにします。 次の章では、**FastAPI** が提供するこれらのツールを使って、あなたのAPIにセキュリティを追加する方法について見ていきます。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_multi_query_errors.py
from fastapi import FastAPI, Query from fastapi.testclient import TestClient app = FastAPI() @app.get("/items/") def read_items(q: list[int] = Query(default=None)): return {"q": q} client = TestClient(app) def test_multi_query(): response = client.get("/items/?q=5&q=6") assert response.status_code == 200, response.text assert response.json() == {"q": [5, 6]} def test_multi_query_incorrect():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_enforce_once_required_parameter.py
from typing import Optional from fastapi import Depends, FastAPI, Query, status from fastapi.testclient import TestClient app = FastAPI() def _get_client_key(client_id: str = Query(...)) -> str: return f"{client_id}_key" def _get_client_tag(client_id: Optional[str] = Query(None)) -> Optional[str]: if client_id is None: return None return f"{client_id}_tag" @app.get("/foo") def foo_handler(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 16 17:21:48 UTC 2025 - 3.3K bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.behind_a_proxy.tutorial001_py39 import app client = TestClient(app, root_path="/api/v1") def test_main(): response = client.get("/app") assert response.status_code == 200 assert response.json() == {"message": "Hello World", "root_path": "/api/v1"} def test_openapi(): response = client.get("/openapi.json") assert response.status_code == 200
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0)