- Sort Score
- Num 10 results
- Language All
Results 141 - 150 of 2,086 for FastAPI (0.2 seconds)
-
docs/zh/docs/how-to/graphql.md
根据你的用例,你可能会更喜欢其他库,但如果你问我,我大概率会建议你先试试 **Strawberry**。 下面是一个将 Strawberry 与 FastAPI 集成的小预览: {* ../../docs_src/graphql_/tutorial001_py310.py hl[3,22,25] *} 你可以在 [Strawberry 文档](https://strawberry.rocks/) 中了解更多信息。 还有关于 [将 Strawberry 与 FastAPI 结合使用](https://strawberry.rocks/docs/integrations/fastapi) 的文档。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 2.6K bytes - Click Count (0) -
docs/zh-hant/docs/how-to/graphql.md
# GraphQL { #graphql } 由於 FastAPI 基於 ASGI 標準,整合任何與 ASGI 相容的 GraphQL 函式庫都很容易。 你可以在同一個應用程式中同時使用一般的 FastAPI 路徑操作 (path operation) 與 GraphQL。 /// tip GraphQL 解決某些非常特定的使用情境。 與一般的 Web API 相比,它有優點也有缺點。 請確認在你的使用情境中,這些效益是否足以彌補其限制。 🤓 /// ## GraphQL 函式庫 { #graphql-libraries } 下面是支援 ASGI 的部分 GraphQL 函式庫,你可以與 FastAPI 一起使用: * [Strawberry](https://strawberry.rocks/) 🍓Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 2.6K bytes - Click Count (0) -
tests/test_stringified_annotation_dependency.py
from __future__ import annotations from typing import TYPE_CHECKING, Annotated import pytest from fastapi import Depends, FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot if TYPE_CHECKING: # pragma: no cover from collections.abc import AsyncGenerator class DummyClient: async def get_people(self) -> list: return ["John Doe", "Jane Doe"] async def close(self) -> None:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2.2K bytes - Click Count (0) -
docs/zh-hant/docs/deployment/server-workers.md
/// ## 多個工作處理序 { #multiple-workers } 你可以用命令列選項 `--workers` 來啟動多個 workers: //// tab | `fastapi` 如果你使用 `fastapi` 指令: <div class="termy"> ```console $ <font color="#4E9A06">fastapi</font> run --workers 4 <u style="text-decoration-style:solid">main.py</u> <span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting production server 🚀Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 7.8K bytes - Click Count (0) -
tests/test_pydantic_v1_error.py
skip_module_if_py_gte_314() from fastapi import FastAPI from fastapi.exceptions import PydanticV1NotSupportedError with warnings.catch_warnings(): warnings.simplefilter("ignore", UserWarning) from pydantic.v1 import BaseModel def test_raises_pydantic_v1_model_in_endpoint_param() -> None: class ParamModelV1(BaseModel): name: str app = FastAPI()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.3K bytes - Click Count (0) -
tests/test_security_api_key_query_optional.py
from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyQuery from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: str | None = Security(api_key)): if oauth_header is None: return None
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.1K bytes - Click Count (0) -
docs_src/security/tutorial001_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import OAuth2PasswordBearer app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") @app.get("/items/") async def read_items(token: Annotated[str, Depends(oauth2_scheme)]):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 309 bytes - Click Count (0) -
docs/en/docs/tutorial/schema-extra-example.md
Because of that, versions of FastAPI previous to 0.99.0 still used versions of OpenAPI lower than 3.1.0. /// ### Pydantic and FastAPI `examples` { #pydantic-and-fastapi-examples }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.7K bytes - Click Count (0) -
docs_src/custom_response/tutorial010_py310.py
from fastapi import FastAPI from fastapi.responses import HTMLResponse app = FastAPI(default_response_class=HTMLResponse) @app.get("/items/") async def read_items():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 22 16:07:19 GMT 2026 - 228 bytes - Click Count (0) -
tests/test_security_api_key_cookie_optional.py
from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyCookie from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel app = FastAPI() api_key = APIKeyCookie(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: str | None = Security(api_key)): if oauth_header is None: return None
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.2K bytes - Click Count (0)