- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 262 for asgi (0.03 seconds)
-
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_custom_middleware_exception.py
from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() class ContentSizeLimitMiddleware: """Content size limiting middleware for ASGI applications Args: app (ASGI application): ASGI application max_content_size (optional): the maximum content size allowed in bytes, None for no limit """ def __init__(self, app: APIRouter, max_content_size: int | None = None):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.8K bytes - Click Count (0) -
tests/test_stream_cancellation.py
"""JSONL async generator with no internal await.""" i = 0 while True: yield i i += 1 async def _run_asgi_and_cancel(app: FastAPI, path: str, timeout: float) -> bool: """Call the ASGI app for *path* and cancel after *timeout* seconds. Returns `True` if the cancellation was delivered (i.e. it did not hang). """ chunks: list[bytes] = []Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 18:56:47 GMT 2026 - 2.7K bytes - Click Count (0) -
docs/zh/docs/advanced/async-tests.md
/// tip | 提示 请注意,我们正在将 async/await 与新的 `AsyncClient` 一起使用——请求是异步的。 /// /// warning | 警告 如果您的应用程序依赖于生命周期事件, `AsyncClient` 将不会触发这些事件。为了确保它们被触发,请使用 [florimondmanca/asgi-lifespan](https://github.com/florimondmanca/asgi-lifespan#usage) 中的 `LifespanManager` 。 /// ## 其他异步函数调用 { #other-asynchronous-function-calls }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 3.9K bytes - Click Count (0) -
docs/en/docs/advanced/async-tests.md
/// /// warning If your application relies on lifespan events, the `AsyncClient` won't trigger these events. To ensure they are triggered, use `LifespanManager` from [florimondmanca/asgi-lifespan](https://github.com/florimondmanca/asgi-lifespan#usage). /// ## Other Asynchronous Function Calls { #other-asynchronous-function-calls }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 3.8K bytes - Click Count (0) -
docs/ru/llm-prompt.md
* proprietary: проприетарный * benchmark: бенчмарк (add (`тест производительности`) if clarification is needed or use just `тест производительности`) * ASGI server: ASGI-сервер * In a hurry? : Нет времени? * response status code: статус-код ответа * HTTP status code: HTTP статус-код * issue (meaning GitHub issue): Issue (add `тикет\обращение` if clarification is needed)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Jan 22 07:07:05 GMT 2026 - 6.5K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/async-tests.md
也就是先前用 `TestClient` 發送請求時所用的寫法。 /// tip 注意,對新的 `AsyncClient` 需搭配 async/await —— 請求是非同步的。 /// /// warning 如果你的應用仰賴 lifespan 事件,`AsyncClient` 不會觸發這些事件。若要確保它們被觸發,請使用 [florimondmanca/asgi-lifespan](https://github.com/florimondmanca/asgi-lifespan#usage) 的 `LifespanManager`。 /// ## 其他非同步函式呼叫 { #other-asynchronous-function-calls } 由於測試函式現在是非同步的,你也可以在測試中呼叫(並 `await`)其他 `async` 函式,和在程式碼其他地方一樣。 /// tipCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 3.5K bytes - Click Count (0) -
docs/zh/docs/alternatives.md
但它不提供自动的数据校验、序列化或文档。 这正是 **FastAPI** 在其之上增加的主要内容之一,全部基于 Python 类型提示(通过 Pydantic)。此外还有依赖注入系统、安全工具、OpenAPI 模式生成等。 /// note | 技术细节 ASGI 是由 Django 核心团队成员推动的新“标准”。它尚不是正式的“Python 标准”(PEP),尽管正朝此方向推进。 尽管如此,已有多种工具将其作为“标准”使用。这极大提升了互操作性:你可以把 Uvicorn 换成其他 ASGI 服务器(如 Daphne 或 Hypercorn),或添加 ASGI 兼容的工具,如 `python-socketio`。 /// /// check | **FastAPI** 用它来: 处理所有核心 Web 部分,并在其之上扩展功能。 `FastAPI` 类本身直接继承自 `Starlette`。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 20.1K bytes - Click Count (0) -
docs/en/docs/alternatives.md
/// note | Technical Details ASGI is a new "standard" being developed by Django core team members. It is still not a "Python standard" (a PEP), although they are in the process of doing that. Nevertheless, it is already being used as a "standard" by several tools. This greatly improves interoperability, as you could switch Uvicorn for any other ASGI server (like Daphne or Hypercorn), or you could add ASGI compatible tools, like `python-socketio`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 22.2K bytes - Click Count (0) -
docs/ja/docs/advanced/async-tests.md
新しい `AsyncClient` では async/await を使っている点に注意してください。リクエストは非同期です。 /// /// warning | 注意 アプリケーションが lifespan イベントに依存している場合、`AsyncClient` はそれらのイベントをトリガーしません。確実にトリガーするには、[florimondmanca/asgi-lifespan](https://github.com/florimondmanca/asgi-lifespan#usage) の `LifespanManager` を使用してください。 /// ## その他の非同期関数呼び出し { #other-asynchronous-function-calls } テスト関数が非同期になったので、FastAPI アプリへのリクエスト送信以外の `async` 関数も、コードの他の場所と同様に呼び出して(`await` して)使えます。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 4.5K bytes - Click Count (0)